diff --git a/addons/website_sale/tests/test_website_sequence.py b/addons/website_sale/tests/test_website_sequence.py index 85cb3cc409f..b09193b3d7c 100644 --- a/addons/website_sale/tests/test_website_sequence.py +++ b/addons/website_sale/tests/test_website_sequence.py @@ -14,6 +14,13 @@ class TestWebsiteSequence(odoo.tests.TransactionCase): # if stock is installed we can't archive since there is orderpoints if hasattr(self.env['product.product'], 'orderpoint_ids'): product_templates.mapped('product_variant_ids.orderpoint_ids').write({'active': False}) + # if pos loyalty is installed we can't archive since there are loyalty rules and rewards + if 'loyalty.rule' in self.env: + rules = self.env['loyalty.rule'].search([]) + rules.unlink() + if 'loyalty.reward' in self.env: + rewards = self.env['loyalty.reward'].search([]) + rewards.unlink() product_templates.write({'active': False}) self.p1, self.p2, self.p3, self.p4 = ProductTemplate.create([{ 'name': 'First Product',