Skip to content

Commit

Permalink
[FIX] account_invoice_move_currency: mig script
Browse files Browse the repository at this point in the history
use _write to avoid already reconcile constraint
  • Loading branch information
jjscarafia committed Jan 31, 2021
1 parent 8199bb0 commit 45b0c12
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def migrate(env, version):
('currency_id', '=', False)]):
amount = line.debit if line.debit else line.credit
sign = 1.0 if line.debit else -1.0
line.write({
line._write({
'currency_id': line.move_id.move_currency_id.id,
'amount_currency': sign * line.move_id.move_currency_id.round(
amount / line.move_id.move_inverse_currency_rate)})

0 comments on commit 45b0c12

Please sign in to comment.