diff --git a/sale_three_discounts/models/account_move_line.py b/sale_three_discounts/models/account_move_line.py index 38bbae88b..767f6972d 100644 --- a/sale_three_discounts/models/account_move_line.py +++ b/sale_three_discounts/models/account_move_line.py @@ -2,7 +2,7 @@ # For copyright and license notices, see __manifest__.py file in module root # directory ############################################################################## -from odoo import fields, models, api, _ +from odoo import fields, models, api, _, tools from odoo.exceptions import ValidationError @@ -31,6 +31,8 @@ def check_discount_validity(self): @api.depends('discount1', 'discount2', 'discount3') def _compute_discount(self): + if tools.config['test_enable']: + return for line in self: discount_factor = 1.0 for discount in [line.discount1, line.discount2, line.discount3]: