[FIX]: Fix onchange account id problem
bzr revid: atp@tinyerp.com-20121011121201-h6030emuz00t55nv
This commit is contained in:
parent
23a0926efd
commit
b27b12db1b
|
@ -154,7 +154,7 @@ class hr_analytic_timesheet(osv.osv):
|
|||
'date': lambda self, cr, uid, ctx: ctx.get('date', fields.date.context_today(self,cr,uid,context=ctx)),
|
||||
'user_id': lambda obj, cr, uid, ctx: ctx.get('user_id', uid),
|
||||
}
|
||||
def on_change_account_id(self, cr, uid, ids, account_id):
|
||||
def on_change_account_id(self, cr, uid, ids, account_id, user_id):
|
||||
return {'value':{}}
|
||||
|
||||
def on_change_date(self, cr, uid, ids, date):
|
||||
|
|
|
@ -174,7 +174,7 @@ account_analytic_line()
|
|||
|
||||
class hr_analytic_timesheet(osv.osv):
|
||||
_inherit = "hr.analytic.timesheet"
|
||||
def on_change_account_id(self, cr, uid, ids, account_id):
|
||||
def on_change_account_id(self, cr, uid, ids, account_id, user_id):
|
||||
res = {}
|
||||
if not account_id:
|
||||
return res
|
||||
|
|
|
@ -389,7 +389,7 @@ class hr_timesheet_line(osv.osv):
|
|||
return True
|
||||
|
||||
def multi_on_change_account_id(self, cr, uid, ids, account_ids, context=None):
|
||||
return dict([(el, self.on_change_account_id(cr, uid, ids, el)) for el in account_ids])
|
||||
return dict([(el, self.on_change_account_id(cr, uid, ids, el, context.get('user_id', False) or uid)) for el in account_ids])
|
||||
|
||||
|
||||
hr_timesheet_line()
|
||||
|
|
Loading…
Reference in New Issue