LaOsaCoop/Odoo16#47 remove lines with qty <= 0
This commit is contained in:
parent
dafaaf9139
commit
68a9b8f190
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue