Criptomart/red-supermercados-coop#1 purchase_order_product_recommendation_supermarket: fix add new productos without stock to purchase orders

This commit is contained in:
Luis 2025-10-29 13:03:59 +01:00
parent 812fe9bef3
commit 29249a41cb

View file

@ -190,6 +190,7 @@ class PurchaseOrderRecommendationSupermarketWizard(models.TransientModel):
): ):
# If ordering by packages we later bump to one full package. # If ordering by packages we later bump to one full package.
qty_to_order = max(qty_to_order, 1) qty_to_order = max(qty_to_order, 1)
res["is_modified"] = True
res["units_included_original"] = qty_to_order res["units_included_original"] = qty_to_order
# Adjust qty_to_order to packaging multiples if order_by_packages is checked # Adjust qty_to_order to packaging multiples if order_by_packages is checked