purchase_order_product_recommendation_supermarket: refresh price from seller

This commit is contained in:
Luis 2025-07-29 20:31:29 +02:00
parent 68a9b8f190
commit b89ca1e5d8

View file

@ -198,6 +198,13 @@ class PurchaseOrderRecommendationSupermarketWizard(models.TransientModel):
res["units_avg_delivered_prev"] = ( res["units_avg_delivered_prev"] = (
found_previous_period[0]["qty_done"] / days if days != 0 else 1 found_previous_period[0]["qty_done"] / days if days != 0 else 1
) )
seller = product_id._select_seller(
partner_id=self.order_id.partner_id,
date=fields.Date.today(),
quantity=qty_to_order,
uom_id=product_id.uom_po_id,
)
res.update(self._prepare_wizard_line_from_seller(res, seller))
return res return res
def action_accept(self): def action_accept(self):