fix: validation error has not throw for the batch (backport #38494) (#38502)

fix: validation error has not throw for the batch (#38494)

* fix: validation error has not throw for the batch

* chore: fix test cases

(cherry picked from commit 5e9016ffab)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot]
2023-12-01 21:46:35 +05:30
committed by GitHub
parent 7b363db582
commit c797c533ed
9 changed files with 50 additions and 5 deletions

View File

@@ -118,6 +118,7 @@ class BuyingController(SubcontractingController):
"company": self.company,
"voucher_type": self.doctype,
"voucher_no": self.name,
"voucher_detail_no": row.name,
},
raise_error_if_no_rate=False,
)
@@ -373,6 +374,7 @@ class BuyingController(SubcontractingController):
"voucher_type": self.doctype,
"voucher_no": self.name,
"allow_zero_valuation": d.get("allow_zero_valuation"),
"voucher_detail_no": d.name,
},
raise_error_if_no_rate=False,
)

View File

@@ -444,6 +444,7 @@ class SellingController(StockController):
"company": self.company,
"voucher_type": self.doctype,
"voucher_no": self.name,
"voucher_detail_no": d.name,
"allow_zero_valuation": d.get("allow_zero_valuation"),
},
raise_error_if_no_rate=False,

View File

@@ -880,6 +880,7 @@ class SubcontractingController(StockController):
"posting_date": self.posting_date,
"posting_time": self.posting_time,
"qty": -1 * item.consumed_qty,
"voucher_detail_no": item.name,
"serial_and_batch_bundle": item.serial_and_batch_bundle,
}
)