[FIX] account, base_setup, hr_timesheet_sheet: improve server actions: remove pointless references to self, don't access ids if they're not needed
bzr revid: xmo@openerp.com-20110912144925-xlpofswq106x3ds4
This commit is contained in:
parent
f03892c5db
commit
c02863060f
|
@ -2426,10 +2426,10 @@
|
|||
<field name="model_id" ref="base.model_ir_actions_todo"/>
|
||||
<field eval="5" name="sequence"/>
|
||||
<field name="code">
|
||||
act_window_ids = self.pool.get('ir.actions.act_window').search(cr, uid,[('name', 'in', ('Accounting Chart Configuration', 'Generate Chart of Accounts from a Chart Template'))], context=context)
|
||||
todo_ids = self.pool.get('ir.actions.todo').search(cr, uid, [('action_id', 'in', act_window_ids)], context=context)
|
||||
self.pool.get('ir.actions.todo').write(cr, uid, todo_ids, {'state':'open'}, context=context)
|
||||
action = self.pool.get('res.config').next(cr, uid, [], context)
|
||||
act_window_ids = pool.get('ir.actions.act_window').search(cr, uid,[('name', 'in', ('Accounting Chart Configuration', 'Generate Chart of Accounts from a Chart Template'))], context=context)
|
||||
todo_ids = pool.get('ir.actions.todo').search(cr, uid, [('action_id', 'in', act_window_ids)], context=context)
|
||||
pool.get('ir.actions.todo').write(cr, uid, todo_ids, {'state':'open'}, context=context)
|
||||
action = pool.get('res.config').next(cr, uid, [], context)
|
||||
</field>
|
||||
<field name="name">New Company Financial Setting</field>
|
||||
</record>
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
<field name="name">Start Configuration</field>
|
||||
<field name="model_id" ref="base.model_ir_actions_todo"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code" eval="'# obj is a browse_record and will provide stupid ids to method\n' 'action = obj.pool.get(\'ir.actions.todo\').action_launch(cr, uid, ' + str([ref('base_setup_installer_todo')]) + ', context=context)'"/>
|
||||
<field name="code" eval="'# obj is a browse_record and will provide stupid ids to method\n' 'action = pool.get(\'ir.actions.todo\').action_launch(cr, uid, ' + str([ref('base_setup_installer_todo')]) + ', context=context)'"/>
|
||||
</record>
|
||||
|
||||
<menuitem name="Add More Features" action="action_start_configurator" id="menu_view_base_module_configuration" parent="base.menu_config" type="server" icon="STOCK_EXECUTE" sequence="100"/>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<field eval=""""ir.actions.server"""" name="type"/>
|
||||
<field name="model_id" ref="model_hr_timesheet_current_open"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval=""""action = self.pool.get('hr.timesheet.current.open').open_timesheet(cr, uid, object.id, context)"""" name="code"/>
|
||||
<field eval=""""action = pool.get('hr.timesheet.current.open').open_timesheet(cr, uid, None, context)"""" name="code"/>
|
||||
<field eval=""""True"""" name="condition"/>
|
||||
<field eval=""""My Timesheet"""" name="name"/>
|
||||
</record>
|
||||
|
|
Loading…
Reference in New Issue