Debug cloning of BOMs

This commit is contained in:
Laurent Destailleur
2019-10-27 00:26:11 +02:00
parent f060ef1018
commit e17cc5b2e5
5 changed files with 11 additions and 14 deletions

View File

@@ -283,8 +283,9 @@ class MyObject extends CommonObject
// Clear fields
$object->ref = "copy_of_".$object->ref;
$object->title = $langs->trans("CopyOf")." ".$object->title;
$object->ref = empty($this->fields['ref']['default']) ? "copy_of_".$object->ref: $this->fields['ref']['default'];
$object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label: $this->fields['label']['default'];
$object->status = self::STATUS_DRAFT;
// ...
// Clear extrafields that are unique
if (is_array($object->array_options) && count($object->array_options) > 0)