diff --git a/sale_commission_product_criteria/models/commission.py b/sale_commission_product_criteria/models/commission.py index 5f8dd9c71..b43e87979 100644 --- a/sale_commission_product_criteria/models/commission.py +++ b/sale_commission_product_criteria/models/commission.py @@ -73,8 +73,6 @@ class CommissionItem(models.Model): domain=[("commission_type", "=", "product")], required=True, ) - use_pricelist = fields.Boolean() - pricelist_id = fields.Many2one("product.pricelist") product_tmpl_id = fields.Many2one( "product.template", "Product", diff --git a/sale_commission_product_criteria/views/views.xml b/sale_commission_product_criteria/views/views.xml index e1ae96d44..a03d6e5ee 100644 --- a/sale_commission_product_criteria/views/views.xml +++ b/sale_commission_product_criteria/views/views.xml @@ -103,7 +103,6 @@ /> - - diff --git a/sale_commission_product_criteria_discount/models/sale.py b/sale_commission_product_criteria_discount/models/sale.py index ec0fee8d7..de532e808 100644 --- a/sale_commission_product_criteria_discount/models/sale.py +++ b/sale_commission_product_criteria_discount/models/sale.py @@ -19,7 +19,6 @@ def _get_single_commission_amount(self, commission, subtotal, product, quantity) item_ids = self._get_commission_items(commission, product) if not item_ids: return 0.0 - so_id = self.object_id.order_id # Check discount condition commission_item = False for item_id in item_ids: @@ -33,13 +32,7 @@ def _get_single_commission_amount(self, commission, subtotal, product, quantity) ): break # suitable item found else: - if ( - commission_item.pricelist_id - and so_id.pricelist_id.id != commission_item.pricelist_id.id - ): - commission_item = False # unsuitable item - else: - break # suitable item found + break # suitable item found commission_item = False if not commission_item: # all commission items rejected