diff options
| author | Jay (Open ERP) <jvo@tinyerp.com> | 2009-04-06 20:45:03 +0530 |
|---|---|---|
| committer | Jay (Open ERP) <jvo@tinyerp.com> | 2009-04-06 20:45:03 +0530 |
| commit | ac73fbf3cbcbf2d50d76e62626c0b88597ca6e14 (patch) | |
| tree | c1588a27c949b8d735a2b06005cf3b17a81d51f8 /addons | |
| parent | 43068ba9c8ee694cb16b49778cac85191158d408 (diff) | |
[FIX] Bug 353742 : analytic_user_function corrected
bzr revid: jvo@tinyerp.com-20090406151503-rb7oshpv4vgbe3pi
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/analytic_user_function/analytic_user_function.py | 2 | ||||
| -rw-r--r-- | addons/analytic_user_function/analytic_user_function_view.xml | 22 |
2 files changed, 19 insertions, 5 deletions
diff --git a/addons/analytic_user_function/analytic_user_function.py b/addons/analytic_user_function/analytic_user_function.py index 1f630053864..6dca1b63d39 100644 --- a/addons/analytic_user_function/analytic_user_function.py +++ b/addons/analytic_user_function/analytic_user_function.py @@ -66,7 +66,7 @@ class hr_analytic_timesheet(osv.osv): return False - def on_change_account_id(self, cr, uid, ids,user_id, account_id, unit_amount=0): + def on_change_account_id(self, cr, uid, ids, account_id, user_id, unit_amount=0): #{'value': {'to_invoice': False, 'amount': (-162.0,), 'product_id': 7, 'general_account_id': (5,)}} res = {} if not (account_id): diff --git a/addons/analytic_user_function/analytic_user_function_view.xml b/addons/analytic_user_function/analytic_user_function_view.xml index 1f7f0c07b10..0bb4c89c973 100644 --- a/addons/analytic_user_function/analytic_user_function_view.xml +++ b/addons/analytic_user_function/analytic_user_function_view.xml @@ -44,14 +44,28 @@ <!-- hr_timesheet_sheet.sheet inherited view --> <record model="ir.ui.view" id="hr_timesheet_sheet_form_inherit"> - <field name="name">hr.timesheet.sheet.form</field> + <field name="name">hr.timesheet.sheet.form.tree</field> <field name="model">hr_timesheet_sheet.sheet</field> <field name="type">form</field> <field name="priority" eval="18"/> <field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/> <field name="arch" type="xml"> <xpath expr="/form/notebook/page/field[@name='timesheet_ids']/tree/field[@name='account_id']" position="replace"> - <field name="account_id" domain="[('type','=','normal'),('state', '<>', 'close')]" on_change="on_change_account_id(user_id, account_id, unit_amount)"/> + <field name="account_id" domain="[('type','=','normal'),('state', '<>', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount)"/> + </xpath> + </field> + </record> + + <!-- hr_timesheet_sheet.sheet inherited view --> + <record model="ir.ui.view" id="hr_timesheet_sheet_form_inherit1"> + <field name="name">hr.timesheet.sheet.form.form</field> + <field name="model">hr_timesheet_sheet.sheet</field> + <field name="type">form</field> + <field name="priority" eval="19"/> + <field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/> + <field name="arch" type="xml"> + <xpath expr="/form/notebook/page/field[@name='timesheet_ids']/form/field[@name='account_id']" position="replace"> + <field name="account_id" domain="[('type','=','normal'),('state', '<>', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount)"/> </xpath> </field> </record> @@ -64,7 +78,7 @@ <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/> <field name="arch" type="xml"> <xpath expr="/form/field[@name='account_id']" position="replace"> - <field name="account_id" domain="[('type','=','normal'),('state', '<>', 'close')]" on_change="on_change_account_id(user_id, account_id, unit_amount)" select="1"/> + <field name="account_id" domain="[('type','=','normal'),('state', '<>', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount)" select="1"/> </xpath> </field> </record> @@ -88,7 +102,7 @@ <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree"/> <field name="arch" type="xml"> <xpath expr="/tree/field[@name='account_id']" position="replace"> - <field name="account_id" domain="[('type','=','normal'),('state', '<>', 'close')]" on_change="on_change_account_id(user_id, account_id, unit_amount)" select="1"/> + <field name="account_id" domain="[('type','=','normal'),('state', '<>', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount)" select="1"/> </xpath> </field> </record> |
