mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-14 15:11:52 +00:00
fix(manufacturing): update cost of BOMs created via BOM Creator
`calculate_rm_cost` skipped rate refresh whenever `bom_creator` was set,
so neither the Update Cost button nor the BOM Update Tool could ever
refresh those BOMs. Every BOM in a multi-level tree carries the field, so
whole trees stayed frozen at their creation rates.
The guard replaced the removed `rm_cost_as_per == "Manual"` check in
0b63dbf, on the assumption that BOM Creator rows hold manual rates. They
do not: BOM Creator recomputes every row from `rm_cost_as_per` on save.
This commit is contained in:
@@ -1003,7 +1003,7 @@ class BOM(WebsiteGenerator):
|
|||||||
|
|
||||||
for d in self.get("items"):
|
for d in self.get("items"):
|
||||||
old_rate = d.rate
|
old_rate = d.rate
|
||||||
if not self.bom_creator and (d.is_stock_item or d.is_phantom_item):
|
if d.is_stock_item or d.is_phantom_item:
|
||||||
d.rate = self.get_rm_rate(
|
d.rate = self.get_rm_rate(
|
||||||
{
|
{
|
||||||
"company": self.company,
|
"company": self.company,
|
||||||
|
|||||||
Reference in New Issue
Block a user