diff --git a/product_variant_configurator/models/pricelist.py b/product_variant_configurator/models/pricelist.py index 1c459fcd3..5f0b5f8fb 100644 --- a/product_variant_configurator/models/pricelist.py +++ b/product_variant_configurator/models/pricelist.py @@ -10,16 +10,27 @@ class ProductPricelist(models.Model): _inherit = "product.pricelist" - def _compute_price_rule(self, products, qty, uom=None, date=False, **kwargs): - """Overwrite for covering the case where templates are passed and a - different uom is used.""" + def _compute_price_rule( + self, + products, + quantity, + currency=None, + uom=None, + date=False, + compute_price=True, + **kwargs, + ): + """Overwrite for covering the case where templates are passed and a different uom is used.""" if products[0]._name != "product.template": # Standard use case - Nothing to do return super()._compute_price_rule( products, - qty, - date=date, + quantity, + currency=currency, uom=uom, + date=date, + compute_price=compute_price, + **kwargs, ) # Isolate object pricelist_obj = self @@ -31,9 +42,12 @@ def _compute_price_rule(self, products, qty, uom=None, date=False, **kwargs): return super(ProductPricelist, pricelist_obj)._compute_price_rule( products, - qty, + quantity, + currency=currency, + uom=uom, date=date, - uom=False, + compute_price=compute_price, + **kwargs, ) def template_price_get(self, prod_id, qty, partner=None): diff --git a/product_variant_configurator/views/inherited_product_product_views.xml b/product_variant_configurator/views/inherited_product_product_views.xml index e538a0d01..afabab8fe 100644 --- a/product_variant_configurator/views/inherited_product_product_views.xml +++ b/product_variant_configurator/views/inherited_product_product_views.xml @@ -6,20 +6,14 @@ - id != False or product_tmpl_id != False - product_tmpl_id != False + product_tmpl_id - Product Template - 0 - 0 - id != False - id != False + id - -

+ + +

Select a template for a variant. Keep empty for a new full product.