From 681e9eff9ab9b79f1ee49071535c9e218f36e81b Mon Sep 17 00:00:00 2001 From: Bruno Zanotti Date: Thu, 1 Feb 2024 13:01:36 -0300 Subject: [PATCH] [FIX] product_pack: include pack price in totalized --- product_pack/models/product_product.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/product_pack/models/product_product.py b/product_pack/models/product_product.py index b040a4314..a15f2f027 100644 --- a/product_pack/models/product_product.py +++ b/product_pack/models/product_product.py @@ -33,8 +33,8 @@ def split_pack_products(self): def price_compute( self, price_type, uom=False, currency=False, company=False, date=False ): - packs, no_packs = self.split_pack_products() - prices = super(ProductProduct, no_packs).price_compute( + packs, _ = self.split_pack_products() + prices = super(ProductProduct, self).price_compute( price_type, uom, currency, company, date ) # TODO:@bruno-zanotti prefetch_fields=False still necessary? @@ -42,7 +42,7 @@ def price_compute( pack_line_prices = product.sudo().pack_line_ids._pack_line_price_compute( price_type, uom, currency, company, date ) - prices[product.id] = sum(pack_line_prices.values()) + prices[product.id] += sum(pack_line_prices.values()) return prices @api.depends("list_price", "price_extra")