diff options
| author | Xavier Morel <xmo@openerp.com> | 2011-09-12 16:49:25 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2011-09-12 16:49:25 +0200 |
| commit | c02863060fc2c1aabd8efdecfd126daebfcfdae7 (patch) | |
| tree | a712e3a3ba7d789e9fee9397cd76cd5c55e707c7 /addons | |
| parent | f03892c5db2c463a41045f02a2f6df861fd4030f (diff) | |
[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
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account/account_view.xml | 8 | ||||
| -rw-r--r-- | addons/base_setup/base_setup_views.xml | 2 | ||||
| -rw-r--r-- | addons/hr_timesheet_sheet/hr_timesheet_sheet_data.xml | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index a81a2811be5..2264508a7da 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -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> diff --git a/addons/base_setup/base_setup_views.xml b/addons/base_setup/base_setup_views.xml index 0e1efb40b32..cb00ac3eb5b 100644 --- a/addons/base_setup/base_setup_views.xml +++ b/addons/base_setup/base_setup_views.xml @@ -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"/> diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_data.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_data.xml index be55c83e0fa..4fc5b2fb1b3 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_data.xml +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_data.xml @@ -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> |
