Skip to content

Commit

Permalink
[FIX] stock_request: SR/SRO conflict where using tier.validation
Browse files Browse the repository at this point in the history
  • Loading branch information
kaynnan committed Jul 2, 2024
1 parent ef6774f commit 0ca62c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions stock_request/models/stock_request_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ def _compute_state(self):
for item in self:
states = item.stock_request_ids.mapped("state")
if not item.stock_request_ids or all(x == "draft" for x in states):
item.state = "draft"
item.write({"state": "draft"})
elif all(x == "cancel" for x in states):
item.state = "cancel"
item.write({"state": "cancel"})
elif all(x in ("done", "cancel") for x in states):
item.state = "done"
item.write({"state": "done"})
else:
item.state = "open"
item.write({"state": "open"})

@api.depends("stock_request_ids.allocation_ids")
def _compute_picking_ids(self):
Expand Down

0 comments on commit 0ca62c8

Please sign in to comment.