mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-21 11:15:10 +00:00
Merge pull request #50058 from matteoarosti/fix/warehouse-source-reference
fix: warehouse source reference in production report
This commit is contained in:
@@ -113,6 +113,13 @@ class ProductionPlanReport:
|
||||
self.orders = query.run(as_dict=True)
|
||||
|
||||
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:
|
||||
return
|
||||
self.warehouses = [d.warehouse for d in self.orders]
|
||||
@@ -135,7 +142,7 @@ class ProductionPlanReport:
|
||||
)
|
||||
or []
|
||||
)
|
||||
self.warehouses.extend([d.source_warehouse for d in raw_materials])
|
||||
self.warehouses.extend([d.warehouse for d in raw_materials])
|
||||
|
||||
else:
|
||||
bom_nos = []
|
||||
|
||||
Reference in New Issue
Block a user