[FIX] account_analytic_plans: correct call to account_get
The account_get method has the signature def account_get(self,... company_id=None, context=None) so should use positional argument context=context. Added missing company_id parameter. Fixes #4084
This commit is contained in:
parent
af8a6096c9
commit
1bac2692e8
|
@ -442,7 +442,9 @@ class sale_order_line(osv.osv):
|
|||
if ids:
|
||||
sale_line = self.browse(cr, uid, ids[0], context=context)
|
||||
for line in inv_line_obj.browse(cr, uid, create_ids, context=context):
|
||||
rec = acct_anal_def_obj.account_get(cr, uid, line.product_id.id, sale_line.order_id.partner_id.id, uid, time.strftime('%Y-%m-%d'), context)
|
||||
rec = acct_anal_def_obj.account_get(cr, uid, line.product_id.id,
|
||||
sale_line.order_id.partner_id.id, uid, time.strftime('%Y-%m-%d'),
|
||||
sale_line.order_id.company_id.id, context=context)
|
||||
|
||||
if rec:
|
||||
inv_line_obj.write(cr, uid, [line.id], {'analytics_id': rec.analytics_id.id}, context=context)
|
||||
|
|
Loading…
Reference in New Issue