Merge pull request #39922 from frappe/mergify/bp/version-15-hotfix/pr-39916

fix: not able to make purchase receipt (backport #39916)
This commit is contained in:
rohitwaghchaure 2024-02-15 17:55:41 +05:30 committed by GitHub
commit bb77f85d89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -539,6 +539,10 @@ class SubcontractingController(StockController):
def __add_supplied_item(self, item_row, bom_item, qty):
bom_item.conversion_factor = item_row.conversion_factor
rm_obj = self.append(self.raw_material_table, bom_item)
if rm_obj.get("qty"):
# Qty field not exists
rm_obj.qty = 0.0
rm_obj.reference_name = item_row.name
if self.doctype == self.subcontract_data.order_doctype: