fix: don't demand raw material transfer for semi FG job cards on submit

validate_transfer_qty uses an empty finished_good to detect legacy job
cards, and unlike validate_semi_finished_goods it ignores
skip_material_transfer. A job card tracking semi finished goods whose
operation had no finished_good fell into the legacy branch and could
not be submitted even with 'Skip Material Transfer' checked on the
work order.

Return early for semi FG job cards; validate_semi_finished_goods
already enforces the transfer requirement for them and honours
skip_material_transfer.

(cherry picked from commit 6c8f0b9b56)
This commit is contained in:
Mihir Kandoi
2026-08-08 14:41:34 +05:30
committed by Mergify
parent c23b16751e
commit 99d9d845bd

View File

@@ -845,6 +845,9 @@ class JobCard(Document):
)
def validate_transfer_qty(self):
if self.track_semi_finished_goods:
return
if (
not self.finished_good
and not self.is_corrective_job_card