Fix item_id error referenced before assigment

This commit is contained in:
Luis 2023-11-10 14:21:57 +01:00
parent 98d6eac395
commit fdf4e1c2a7

View file

@ -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]