49// Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id).
50 $this->numero = 701; // TODO Go on page https://wiki.dolibarr.org/index.php/List_of_modules_id to reserve an id number for your module
51// Key text used to identify module (for permissions, menus, etc...)
52 $this->rights_class = 'stocktransfer';
53// Family can be 'base' (core modules),'crm','financial','hr','projects','products','ecm','technic' (transverse modules),'interface' (link with external tools),'other','...'
54// It is used to group modules by family in module setup page
55 $this->family = "products";
56// Module position in the family on 2 digits ('01', '10', '20', ...)
57 $this->module_position = '90';
58// Gives the possibility for the module, to provide his own family info and position of this family (Overwrite $this->family and $this->module_position. Avoid this)
74// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
75// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'
76 $this->picto = 'stock';
77// Define some features supported by module (triggers, login, substitutions, menus, css, etc...)
78 $this->module_parts = array(
79// Set this to 1 if module has its own trigger directory (core/triggers)
80'triggers' => 0,
81// Set this to 1 if module has its own login method file (core/login)
82'login' => 0,
83// Set this to 1 if module has its own substitution function file (core/substitutions)
84'substitutions' => 0,
85// Set this to 1 if module has its own menus handler directory (core/menus)
86'menus' => 0,
87// Set this to 1 if module overwrite template dir (core/tpl)
88'tpl' => 0,
89// Set this to 1 if module has its own barcode directory (core/modules/barcode)
90'barcode' => 0,
91// Set this to 1 if module has its own models directory (core/modules/xxx)
92'models' => 1,
93// Set this to 1 if module has its own theme directory (theme)
94'theme' => 0,
95// Set this to relative path of css file if module has its own css file
96'css' => array(
97// '/stocktransfer/css/stocktransfer.css.php',
98 ),
99// Set this to relative path of js file if module must load a js on all pages
100'js' => array(
101// '/stocktransfer/js/stocktransfer.js.php',
102 ),
103// Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context to 'all'
104'hooks' => array(
105// 'data' => array(
106// 'hookcontext1',
107// 'hookcontext2',
108// ),
109// 'entity' => '0',
110 ),
111// Set this to 1 if features of module are opened to external users
112'moduleforexternal' => 0,
113'contactelement' => 1
114 );
115// Data directories to create when module is enabled.
123// List of module class names as string that must be enabled if this module is enabled. Example: array('always'=>array('modModuleToEnable1','modModuleToEnable2'), 'FR'=>array('modModuleToEnableFR'...))
148// $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@stocktransfer:$user->rights->stocktransfer->read:/stocktransfer/mynewtab1.php?id=__ID__'); // To add a new tab identified by code tabname1
149// $this->tabs[] = array('data'=>'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@stocktransfer:$user->rights->othermodule->read:/stocktransfer/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key.
150// $this->tabs[] = array('data'=>'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname
151//
152// Where objecttype can be
153// 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
154// 'contact' to add a tab in contact view
155// 'contract' to add a tab in contract view
156// 'group' to add a tab in group view
157// 'intervention' to add a tab in intervention view
158// 'invoice' to add a tab in customer invoice view
159// 'invoice_supplier' to add a tab in supplier invoice view
160// 'member' to add a tab in foundation member view
161// 'opensurveypoll' to add a tab in opensurvey poll view
162// 'order' to add a tab in sales order view
163// 'order_supplier' to add a tab in supplier order view
164// 'payment' to add a tab in payment view
165// 'payment_supplier' to add a tab in supplier payment view
166// 'product' to add a tab in product view
167// 'propal' to add a tab in propal view
168// 'project' to add a tab in project view
169// 'stock' to add a tab in stock view
170// 'thirdparty' to add a tab in third party view
171// 'user' to add a tab in user view
172
173// Dictionaries
174 $this->dictionaries = [];
175/* Example:
176 $this->dictionaries=array(
177 'langs'=>'stocktransfer@stocktransfer',
178 // List of tables we want to see into dictionary editor
183 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f', 'SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f', 'SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'),
269 } // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default')
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.