fix(manufacturing): set sales order references in subassembly child table

(cherry picked from commit 0f2ed28ab7)
This commit is contained in:
Sudharsanan11
2026-02-11 23:48:19 +05:30
committed by Mergify
parent 605c0db976
commit f4b0e646b4

View File

@@ -844,6 +844,8 @@ class ProductionPlan(Document):
"stock_uom",
"bom_level",
"schedule_date",
"sales_order",
"sales_order_item",
]:
if row.get(field):
wo_data[field] = row.get(field)
@@ -898,6 +900,8 @@ class ProductionPlan(Document):
"qty",
"description",
"production_plan_item",
"sales_order",
"sales_order_item",
]:
po_data[field] = row.get(field)
@@ -1122,6 +1126,10 @@ class ProductionPlan(Document):
if not is_group_warehouse:
data.fg_warehouse = self.sub_assembly_warehouse
if not self.combine_sub_items:
data.sales_order = row.sales_order
data.sales_order_item = row.sales_order_item
def set_default_supplier_for_subcontracting_order(self):
items = [
d.production_item for d in self.sub_assembly_items if d.type_of_manufacturing == "Subcontract"