Skip to content

Commit

Permalink
fix: on closed unreserved the production plan qty
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure committed Dec 19, 2023
1 parent 20a764a commit 9f7f887
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ def set_status(self, close=None):

if close:
self.db_set("status", "Closed")
self.update_bin_qty()
return

if self.total_produced_qty > 0:
Expand All @@ -522,6 +523,9 @@ def set_status(self, close=None):
if close is not None:
self.db_set("status", self.status)

if self.docstatus == 1 and self.status != "Completed":
self.update_bin_qty()

def update_ordered_status(self):
update_status = False
for d in self.po_items:
Expand Down

0 comments on commit 9f7f887

Please sign in to comment.