Skip to content
Snippets Groups Projects
Commit 5ec44017 authored by Simon Lejeune's avatar Simon Lejeune
Browse files

[FIX] sale_stock: adapt to procurements removal

Now, the move is directly linked to the sale order line.
parent 406ba5dc
Branches
Tags
No related merge requests found
......@@ -26,7 +26,7 @@ class StockMove(models.Model):
if 'product_uom_qty' in vals:
for move in self:
if move.state == 'done':
sale_order_lines = self.filtered(lambda move: move.procurement_id.sale_line_id and move.product_id.expense_policy == 'no').mapped('procurement_id.sale_line_id')
sale_order_lines = self.filtered(lambda move: move.sale_line_id and move.product_id.expense_policy == 'no').mapped('sale_line_id')
for line in sale_order_lines:
line.qty_delivered = line._get_delivered_qty()
return res
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment