Quantcast
Channel: Dolibarr Forum :: Topics in Category: Creation of a New Module
Viewing all articles
Browse latest Browse all 440

Little bugs in menus handler - by: mgribaudo

$
0
0
Hi,
I noticed how adding a new subitem in the Suppliers Invoices menu, this new item is shown as a submenu of the List item.
I think, but not sure, this is because, in eldy.lib.php the List item is defined using the same "leftmenu" item as the parent item

Chengin the line :

$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("List"),1,$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills');

into :

$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("List"),1,$user->rights->fournisseur->facture->lire);

all seems to work properly.

My menu line in module descriptor is:

$this->menu[$r] = array('fk_menu' => 'fk_mainmenu=accountancy,fk_leftmenu=suppliers_bills',
'type' => 'left',
'titre' => 'SendSuppliersInvoices',
'mainmenu' => 'accountancy',
'leftmenu' => 'suppliers_bills',
'url' => '/mymodule/project/somepage.php',
'langs' => 'invoicebymail@invoicebymail',
'position' => 1,
'enabled' => '1',
'perms' => '$user->rights->InvoiceByMail->Create',
'target' => '',
'user' => '0',);

Ciao
Marcello

Viewing all articles
Browse latest Browse all 440

Trending Articles