From 180527d23a582498f8fd3330a708a9d40c1b0c3b Mon Sep 17 00:00:00 2001 From: Florian Mortgat Date: Fri, 16 Jul 2021 10:10:57 +0200 Subject: [PATCH 1/2] FIX 13.0: class CommandeFournisseurDispatch provides trigger for UPDATE but not for CREATE / DELETE --- .../fourn/class/fournisseur.commande.dispatch.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index a7abed27369..0cffacc19a3 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -204,8 +204,8 @@ class CommandeFournisseurDispatch extends CommonObject // want this action calls a trigger. //// Call triggers - //$result=$this->call_trigger('MYOBJECT_CREATE',$user); - //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} + $result=$this->call_trigger('LINERECEPTION_CREATE', $user); + if ($result < 0) $error++; //// End call triggers } } @@ -419,8 +419,8 @@ class CommandeFournisseurDispatch extends CommonObject // want this action calls a trigger. //// Call triggers - //$result=$this->call_trigger('MYOBJECT_DELETE',$user); - //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} + $result=$this->call_trigger('LINERECEPTION_DELETE', $user); + if ($result < 0) $error++; //// End call triggers } } From c928de89c6c3b84f5192a4740785b384bf98759d Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 16 Jul 2021 10:41:06 +0200 Subject: [PATCH 2/2] fix: print barcode sould not be available for external user --- htdocs/core/modules/modBarcode.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/modBarcode.class.php b/htdocs/core/modules/modBarcode.class.php index 6a894972eb7..4b55f2e438f 100644 --- a/htdocs/core/modules/modBarcode.class.php +++ b/htdocs/core/modules/modBarcode.class.php @@ -104,7 +104,7 @@ class modBarcode extends DolibarrModules 'enabled'=>'$conf->barcode->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. 'perms'=>'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->lire_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules 'target'=>'', - 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both + 'user'=>0); // 0=Menu for internal users, 1=external users, 2=both $r++; $this->menu[$r] = array('fk_menu'=>'fk_mainmenu=home,fk_leftmenu=admintools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode