From 76cea528b57e5bfd809bbed15be5cbf591b30f27 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 15 May 2018 21:05:08 +0200 Subject: [PATCH] [FIX] account_credit_control_dunning_fees: Change currency by SQL To avoid constraint. --- .../tests/test_fees_generation.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/account_credit_control_dunning_fees/tests/test_fees_generation.py b/account_credit_control_dunning_fees/tests/test_fees_generation.py index 0a608c63d..2a76f110b 100644 --- a/account_credit_control_dunning_fees/tests/test_fees_generation.py +++ b/account_credit_control_dunning_fees/tests/test_fees_generation.py @@ -16,7 +16,10 @@ class FixedFeesTester(common.TransactionCase): self.assertTrue(self.usd) self.company = self.browse_ref('base.main_company') - self.company.currency_id = self.euro + self.env.cr.execute( + """UPDATE res_company SET currency_id = %s + WHERE id = %s""", (self.company.id, self.euro.id), + ) level_obj = self.env['credit.control.policy.level'] self.euro_level = level_obj.new({