From dedb50bfa26cd230adf4a6507d58a9a0d01c39a1 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Thu, 30 Oct 2014 14:54:16 +0100 Subject: [PATCH] Workaround to force recomputation of residual, cf. https://github.com/odoo/odoo/issues/3395 --- .../scenarios/features/steps/account_voucher.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/account_credit_control/scenarios/features/steps/account_voucher.py b/account_credit_control/scenarios/features/steps/account_voucher.py index 921278ceb..b7943461b 100644 --- a/account_credit_control/scenarios/features/steps/account_voucher.py +++ b/account_credit_control/scenarios/features/steps/account_voucher.py @@ -82,6 +82,10 @@ def impl(ctx, amount, inv_name): VoucherLine.create(line) voucher.button_proforma_voucher() + # Workaround to force recomputation of the residual. + # Must be removed once this bug is fixed: + # https://github.com/odoo/odoo/issues/3395 + invoice.write({'currency_id': invoice.currency_id.id}) @step('I import invoice "{inv_name}" using import invoice button') def impl(ctx, inv_name):