[FIX]: analytic account onchange problem.
bzr revid: atp@tinyerp.com-20121009104842-njdr868dtc4ly1w9
This commit is contained in:
@@ -65,7 +65,7 @@ class hr_analytic_timesheet(osv.osv):
|
||||
return False
|
||||
|
||||
|
||||
def on_change_account_id(self, cr, uid, ids, account_id, user_id=False, unit_amount=0):
|
||||
def on_change_account_id(self, cr, uid, ids, account_id, user_id, unit_amount=0):
|
||||
res = {}
|
||||
if not (account_id):
|
||||
#avoid a useless call to super
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="account_id" position="replace">
|
||||
<field domain="[('type','in',['normal','contract']),('state', '<>', 'close'),('use_timesheets','=',1)]" name="account_id" on_change="on_change_account_id(account_id)" context="{'default_use_timesheets': 1}"/>
|
||||
<field domain="[('type','in',['normal','contract']),('state', '<>', 'close'),('use_timesheets','=',1)]" name="account_id" on_change="on_change_account_id(account_id, user_id)" context="{'default_use_timesheets': 1}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
@@ -72,7 +72,7 @@
|
||||
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="account_id" position="replace">
|
||||
<field domain="[('type','in',['normal','contract']),('state', '<>', 'close'),('use_timesheets','=',1)]" name="account_id" on_change="on_change_account_id(account_id)" context="{'default_use_timesheets': 1}"/>
|
||||
<field domain="[('type','in',['normal','contract']),('state', '<>', 'close'),('use_timesheets','=',1)]" name="account_id" on_change="on_change_account_id(account_id, user_id)" context="{'default_use_timesheets': 1}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user