[FIX] account, base_setup, hr_timesheet_sheet: improve server actions: remove pointle...
authorXavier Morel <xmo@openerp.com>
Mon, 12 Sep 2011 14:49:25 +0000 (16:49 +0200)
committerXavier Morel <xmo@openerp.com>
Mon, 12 Sep 2011 14:49:25 +0000 (16:49 +0200)
bzr revid: xmo@openerp.com-20110912144925-xlpofswq106x3ds4

addons/account/account_view.xml
addons/base_setup/base_setup_views.xml
addons/hr_timesheet_sheet/hr_timesheet_sheet_data.xml

index a81a281..2264508 100644 (file)
             <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>
index 0e1efb4..cb00ac3 100644 (file)
@@ -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"/>
index be55c83..4fc5b2f 100644 (file)
@@ -7,7 +7,7 @@
             <field eval="&quot;&quot;&quot;ir.actions.server&quot;&quot;&quot;" name="type"/>
             <field name="model_id" ref="model_hr_timesheet_current_open"/>
             <field eval="[(6,0,[])]" name="child_ids"/>
-            <field eval="&quot;&quot;&quot;action = self.pool.get('hr.timesheet.current.open').open_timesheet(cr, uid, object.id, context)&quot;&quot;&quot;" name="code"/>
+            <field eval="&quot;&quot;&quot;action = pool.get('hr.timesheet.current.open').open_timesheet(cr, uid, None, context)&quot;&quot;&quot;" name="code"/>
             <field eval="&quot;&quot;&quot;True&quot;&quot;&quot;" name="condition"/>
             <field eval="&quot;&quot;&quot;My Timesheet&quot;&quot;&quot;" name="name"/>
         </record>