From fdf4e1c2a7009bd09a5b0b875f2652e8871bbf8b Mon Sep 17 00:00:00 2001 From: luis Date: Fri, 10 Nov 2023 14:21:57 +0100 Subject: [PATCH] Fix item_id error referenced before assigment --- product_update_price_last_purchase/models/product_pricelist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/product_update_price_last_purchase/models/product_pricelist.py b/product_update_price_last_purchase/models/product_pricelist.py index 2a9faa3..e568758 100644 --- a/product_update_price_last_purchase/models/product_pricelist.py +++ b/product_update_price_last_purchase/models/product_pricelist.py @@ -14,6 +14,7 @@ class ProductPricelist(models.Model): ProductProduct = self.env['product.product'] res = super()._compute_price_rule(products_qty_partner, date=date, uom_id=uom_id) new_res = res.copy() + item_id = [] for product_id, values in res.items(): if values[1]: item_id = values[1]