Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/accountancy/journal/bankjournal.php
This commit is contained in:
Laurent Destailleur 2024-07-06 14:10:20 +02:00
commit eb5b3deddf
2 changed files with 12 additions and 1 deletions

View file

@ -8459,6 +8459,17 @@ abstract class CommonObject
if (!empty($classpath)) {
dol_include_once($InfoFieldList[1]);
if ($classname && !class_exists($classname)) {
// from V19 of Dolibarr, In some cases link use element instead of class, example project_task
// TODO use newObjectByElement() introduce in V20 by PR #30036 for better errors management
$element_prop = getElementProperties($classname);
if ($element_prop) {
$classname = $element_prop['classname'];
}
}
if ($classname && class_exists($classname)) {
$object = new $classname($this->db);
if ($object->element === 'product') { // Special case for product because default valut of fetch are wrong

View file

@ -1593,7 +1593,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
print '<tr><td>'.$langs->trans("Duration").'</td><td>';
print img_picto('', 'clock', 'class="pictofixedwidth"');
print '<input name="duration_value" size="4" value="'.GETPOSTINT('duration_value').'">';
print $formproduct->selectMeasuringUnits("duration_unit", "time", (GETPOSTISSET('duration_value') ? GETPOST('duration_value', 'alpha') : 'h'), 0, 1);
print $formproduct->selectMeasuringUnits("duration_unit", "time", (GETPOSTISSET('duration_unit') ? GETPOST('duration_unit', 'alpha') : 'h'), 0, 1);
// Mandatory period
print ' &nbsp; &nbsp; &nbsp; ';