fix: get bom_no from sales order item and material request item

(cherry picked from commit ac354505ef)
This commit is contained in:
Mihir Kandoi
2025-03-13 18:11:20 +05:30
committed by Mergify
parent 62c9181651
commit e2418101ab
2 changed files with 2 additions and 0 deletions

View File

@@ -425,6 +425,7 @@ class ProductionPlan(Document):
mr_item.item_code,
mr_item.warehouse,
mr_item.description,
mr_item.bom_no,
((mr_item.qty - mr_item.ordered_qty) * mr_item.conversion_factor).as_("pending_qty"),
)
.distinct()

View File

@@ -876,6 +876,7 @@ def make_material_request(source_name, target_doc=None):
"name": "sales_order_item",
"parent": "sales_order",
"delivery_date": "required_by",
"bom_no": "bom_no",
},
"condition": lambda item: not frappe.db.exists(
"Product Bundle", {"name": item.item_code, "disabled": 0}