From f1eb3c9bab65c21cc417fae68ca903c8c0cb58f8 Mon Sep 17 00:00:00 2001 From: ferran-S73 Date: Mon, 20 May 2024 08:51:16 +0200 Subject: [PATCH] [16.0][IMP] base_global_discount: Add m2m to exclude products from discount --- base_global_discount/models/global_discount.py | 5 +++++ base_global_discount/views/global_discount_views.xml | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/base_global_discount/models/global_discount.py b/base_global_discount/models/global_discount.py index e0f53fc57..afd41f581 100644 --- a/base_global_discount/models/global_discount.py +++ b/base_global_discount/models/global_discount.py @@ -21,6 +21,11 @@ class GlobalDiscount(models.Model): string="Company", default=lambda self: self.env.company, ) + excluded_product_ids = fields.Many2many( + comodel_name="product.product", + string="Excluded Products", + help="Products that will not be affected by this discount", + ) def name_get(self): result = [] diff --git a/base_global_discount/views/global_discount_views.xml b/base_global_discount/views/global_discount_views.xml index f5128babf..0b274fc84 100644 --- a/base_global_discount/views/global_discount_views.xml +++ b/base_global_discount/views/global_discount_views.xml @@ -10,6 +10,12 @@ + @@ -25,6 +31,11 @@ +