LaOsaCoop/Odoo16#47 remove lines with qty <= 0

This commit is contained in:
Luis 2025-07-28 13:20:57 +02:00
parent dafaaf9139
commit 68a9b8f190

View file

@ -200,6 +200,12 @@ class PurchaseOrderRecommendationSupermarketWizard(models.TransientModel):
) )
return res return res
def action_accept(self):
super().action_accept()
for line in self.order_id.order_line:
if line.product_qty <= 0:
line.unlink()
def _get_days_out_of_stock(self, product): def _get_days_out_of_stock(self, product):
""" """
Returns the number of days between date_begin and date_end Returns the number of days between date_begin and date_end