mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-16 11:13:32 +00:00
fix: warehouse source reference in production report
(cherry picked from commit 451651e350)
This commit is contained in:
@@ -113,6 +113,13 @@ class ProductionPlanReport:
|
|||||||
self.orders = query.run(as_dict=True)
|
self.orders = query.run(as_dict=True)
|
||||||
|
|
||||||
def get_raw_materials(self):
|
def get_raw_materials(self):
|
||||||
|
"""Retrieve raw materials and source warehouses for production orders.
|
||||||
|
|
||||||
|
This method collects BOM or Work Order items depending on the selected
|
||||||
|
filter and updates `self.raw_materials_dict`, `self.warehouses`,
|
||||||
|
and `self.item_codes` accordingly.
|
||||||
|
"""
|
||||||
|
|
||||||
if not self.orders:
|
if not self.orders:
|
||||||
return
|
return
|
||||||
self.warehouses = [d.warehouse for d in self.orders]
|
self.warehouses = [d.warehouse for d in self.orders]
|
||||||
@@ -135,7 +142,7 @@ class ProductionPlanReport:
|
|||||||
)
|
)
|
||||||
or []
|
or []
|
||||||
)
|
)
|
||||||
self.warehouses.extend([d.source_warehouse for d in raw_materials])
|
self.warehouses.extend([d.warehouse for d in raw_materials])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
bom_nos = []
|
bom_nos = []
|
||||||
|
|||||||
Reference in New Issue
Block a user