Skip to content

Commit

Permalink
Module SynergieTech: task Dolibarr#1039 - Correction de la propagatio…
Browse files Browse the repository at this point in the history
…n des références clients
  • Loading branch information
kkhelifa-opendsi authored and Alexis LAURIER committed Jan 6, 2021
1 parent a2cc482 commit 7ec81fb
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public function runTrigger($action, $object, User $user, Translate $langs, Conf

// Propagation of references
if (preg_match('/_CREATE$/i', $action) && !empty($object->origin) && $object->origin_id > 0 && isset($authorized_element[$object->element])) {
// Reload object
$object->fetch($object->id);

// Parse element/subelement (ex: project_task)
$element = $subelement = $object->origin;
if (preg_match('/^([^_]+)_([^_]+)/i', $object->origin, $regs)) {
Expand Down

0 comments on commit 7ec81fb

Please sign in to comment.