瀏覽代碼

Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 14.0

Conflicts:
	htdocs/core/modules/modBarcode.class.php
	htdocs/fourn/class/fournisseur.commande.dispatch.class.php
Laurent Destailleur 3 年之前
父節點
當前提交
af1c43c70d

+ 2 - 1
htdocs/core/modules/modBarcode.class.php

@@ -93,6 +93,7 @@ class modBarcode extends DolibarrModules
 
 		// Main menu entries
 		$r = 0;
+
 		$this->menu[$r] = array(
 			'fk_menu'=>'fk_mainmenu=tools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
 			'mainmenu'=>'tools',
@@ -106,7 +107,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++;
 

+ 6 - 7
htdocs/fourn/class/fournisseur.commande.dispatch.class.php

@@ -220,13 +220,12 @@ class CommandeFournisseurDispatch extends CommonObject
 			$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element);
 
 			if (!$notrigger) {
-				// Uncomment this and change MYOBJECT to your own tag if you
-				// 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}
-				//// End call triggers
+				// Call triggers
+				$result=$this->call_trigger('LINERECEPTION_CREATE', $user);
+				if ($result < 0) {
+					$error++;
+				}
+				// End call triggers
 			}
 		}