fix: skip the pending production check on update-after-submit saves

Saving a submitted manufacture entry to change an allowed field re-ran
the pending production cap with a manufactured aggregate that already
includes the entry itself, so the save was rejected against the
post-entry remainder. Quantities are not editable after submit, so the
check has nothing to protect there.
This commit is contained in:
Mihir Kandoi
2026-08-08 16:42:28 +05:30
parent db99657c47
commit bed957fa67

View File

@@ -1482,6 +1482,9 @@ class StockEntry(StockController, SubcontractingInwardController):
if self.purpose != "Manufacture" or not self.job_card:
return
if self._action == "update_after_submit":
return
job_card = frappe.get_doc("Job Card", self.job_card)
if job_card.is_corrective_job_card or job_card.is_subcontracted:
return