2014-11-20 13:04 GMT+01:00 Cédric Krier <[email protected]>: > On 20 Nov 12:41, Guillem Barba Domingo wrote: > > 2014-11-20 12:19 GMT+01:00 Cédric Krier <[email protected]>: > > > > > On 20 Nov 12:03, Guillem Barba Domingo wrote: > > > > Hi folks, > > > > > > > > I need to define an alternative menu to be used for some users who > have > > > to > > > > access only to one wizard. > > > > > > > > I defined the next wizard, menu and act_window in our customer's > module > > > [1] > > > > > > > > I created a user belonging only to "Production Start Wizard" group > and > > > set > > > > the "Menu Start/End Production" act_window as him Menu Action... > > > > but it doesn't have the expected efecte because it has the main menu: > > > > menuitems without parent [2] :-( > > > > > > > > I'm working with Tryton 3.2 > > > > > > > > any clue? > > > > > > Your domain is wrong because it will evaluate to parent = None > > > Use: > > > > > > [('id', '=', Id('module.menu_exclusive_production'))] > > > > > > > It was my first intend, but it raises an error when update the module: > > > > In tag record: model ir.action.act_window with id > > act_menu_production_start_end_tree. > > Traceback (most recent call last): > > > "/home/guillem/nan/projectes/tryton/customer/trytond/trytond/ir/action.py", > > line 804, in check_domain > > 'action': action.rec_name, > > File > > "/home/guillem/nan/projectes/tryton/customer/trytond/trytond/error.py", > > line 74, in raise_user_error > > raise UserError(error) > > trytond.exceptions.UserError: ('UserError', (u'Invalid domain or search > > criteria "[(\'id\', \'=\', Id(\'customer.menu_exclusive_production\'))]" > on > > action "Menu Start/End Production".', '')) > > Looks like we are missing Id in pyson.CONTEXT.
Issue filled: https://bugs.tryton.org/issue4352 I'll provide a patch -- Guillem Barba http://www.guillem.alcarrer.net
