mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[FIX] mrp_sale_info: check moves
This commit is contained in:
@@ -35,9 +35,10 @@ class StockRule(models.Model):
|
||||
values.get("group_id").id if values.get("group_id", False) else False
|
||||
)
|
||||
moves = values.get("move_dest_ids")
|
||||
line_ids = moves.sale_line_id
|
||||
while moves.move_dest_ids:
|
||||
moves = moves.move_dest_ids
|
||||
line_ids |= moves.sale_line_id
|
||||
res["sale_line_ids"] = line_ids and [(4, x.id) for x in line_ids] or False
|
||||
if moves:
|
||||
line_ids = moves.sale_line_id
|
||||
while moves.move_dest_ids:
|
||||
moves = moves.move_dest_ids
|
||||
line_ids |= moves.sale_line_id
|
||||
res["sale_line_ids"] = line_ids and [(4, x.id) for x in line_ids] or False
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user