[FIX] account: pass context as kwargs

context -> context=context in writes within validate.
This is required for super().write with new api.

Closes #10645
This commit is contained in:
Luc De Meyer 2016-01-27 16:44:23 +01:00 committed by Martin Trigaux
parent bb2ecb3672
commit b493faf595
1 changed files with 4 additions and 4 deletions

View File

@ -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)