New: Add menu entry to barcode genration page.
This commit is contained in:
parent
bea74e54c8
commit
6c3c66c45d
@ -8,6 +8,7 @@ For users:
|
|||||||
- New: Add graph stats for suppliers orders in tab "stats" on products.
|
- New: Add graph stats for suppliers orders in tab "stats" on products.
|
||||||
- New: Add option MAIN_HIDE_INACTIVETAB_ON_PRINT to hide inactive tabs when you
|
- New: Add option MAIN_HIDE_INACTIVETAB_ON_PRINT to hide inactive tabs when you
|
||||||
use the "print" view on screen.
|
use the "print" view on screen.
|
||||||
|
- New: Add menu entry to barcode genration page.
|
||||||
|
|
||||||
For translators:
|
For translators:
|
||||||
- Update language files.
|
- Update language files.
|
||||||
|
|||||||
@ -593,9 +593,11 @@ abstract class CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load data for barcode
|
* Load data for barcode into properties ->barcode_type*
|
||||||
|
* Properties ->barcode_type is used to find others.
|
||||||
|
* If not defined, ->element must be defined to know default barcode type.
|
||||||
*
|
*
|
||||||
* @return int <0 if KO, >=0 if OK
|
* @return int <0 if KO, >=0 if OK
|
||||||
*/
|
*/
|
||||||
function fetch_barcode()
|
function fetch_barcode()
|
||||||
{
|
{
|
||||||
@ -2094,7 +2096,7 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
|
|
||||||
if ($numrows) return $numrows;
|
if ($numrows) return $numrows;
|
||||||
else return 0;
|
else return 0;
|
||||||
}
|
}
|
||||||
@ -2150,7 +2152,7 @@ abstract class CommonObject
|
|||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) return 0; // For avoid conflicts if trigger used
|
if (! empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) return 0; // For avoid conflicts if trigger used
|
||||||
|
|
||||||
if (! empty($this->array_options))
|
if (! empty($this->array_options))
|
||||||
{
|
{
|
||||||
// Check parameters
|
// Check parameters
|
||||||
|
|||||||
@ -96,14 +96,16 @@ class modBarcode extends DolibarrModules
|
|||||||
|
|
||||||
// Main menu entries
|
// Main menu entries
|
||||||
$r=0;
|
$r=0;
|
||||||
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=modulesadmintools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
$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
|
||||||
'type'=>'left', // This is a Left menu entry
|
'mainmenu'=>'tools',
|
||||||
|
'leftmenu'=>'barcodeprint',
|
||||||
|
'type'=>'left', // This is a Left menu entry
|
||||||
'titre'=>'BarCodePrintsheet',
|
'titre'=>'BarCodePrintsheet',
|
||||||
'url'=>'/barcode/printsheet.php',
|
'url'=>'/barcode/printsheet.php',
|
||||||
'langs'=>'cron', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||||
'position'=>200,
|
'position'=>200,
|
||||||
'enabled'=>'$leftmenu==\'modulesadmintools\' && $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.
|
'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'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||||
'target'=>'',
|
'target'=>'',
|
||||||
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||||
$r++;
|
$r++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user