From b493faf5955a905cddbfe10bff0643d975d1b1ea Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Wed, 27 Jan 2016 16:44:23 +0100 Subject: [PATCH] [FIX] account: pass context as kwargs context -> context=context in writes within validate. This is required for super().write with new api. Closes #10645 --- addons/account/account.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 87f31daa6d9..18cabe9e169 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1580,7 +1580,7 @@ class account_move(osv.osv): obj_move_line.write(cr, uid, line_draft_ids, { 'state': 'valid' - }, context, check=False) + }, context=context, check=False) account = {} account2 = {} @@ -1599,7 +1599,7 @@ class account_move(osv.osv): obj_move_line.write(cr, uid, [line.id], { 'tax_code_id': code, 'tax_amount': amount - }, context, check=False) + }, context=context, check=False) elif journal.centralisation: # If the move is not balanced, it must be centralised... @@ -1614,7 +1614,7 @@ class account_move(osv.osv): self._centralise(cr, uid, move, 'credit', context=context) obj_move_line.write(cr, uid, line_draft_ids, { 'state': 'valid' - }, context, check=False) + }, context=context, check=False) else: # We can't validate it (it's unbalanced) # Setting the lines as draft @@ -1622,7 +1622,7 @@ class account_move(osv.osv): if not_draft_line_ids: obj_move_line.write(cr, uid, not_draft_line_ids, { 'state': 'draft' - }, context, check=False) + }, context=context, check=False) # Create analytic lines for the valid moves for record in valid_moves: obj_move_line.create_analytic_lines(cr, uid, [line.id for line in record.line_id], context)