[FIX] account: mute logger on expected Exception in test

This commit is contained in:
Christophe Simonis
2019-03-04 17:09:21 +01:00
parent c3764265de
commit 1693a27f28
@@ -2,6 +2,7 @@
from odoo.addons.account.tests.account_test_classes import AccountingTestCase
from odoo.exceptions import ValidationError
from odoo.tools import mute_logger
import time
@@ -58,7 +59,8 @@ class TestAccountInvoiceRounding(AccountingTestCase):
# to avoid a ValidationError from _check_cash_rounding because the onchange
# are not well triggered in the tests.
try:
invoice_id.cash_rounding_id = cash_rounding_id
with mute_logger('odoo.models'):
invoice_id.cash_rounding_id = cash_rounding_id
except ValidationError:
pass