mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 08:35:00 +00:00
fix: redundant message on bom save
This commit is contained in:
@@ -475,7 +475,7 @@ class BOM(WebsiteGenerator):
|
||||
)
|
||||
)
|
||||
|
||||
def get_rm_rate(self, arg):
|
||||
def get_rm_rate(self, arg, notify=True):
|
||||
"""Get raw material rate as per selected method, if bom exists takes bom cost"""
|
||||
rate = 0
|
||||
if not self.rm_cost_as_per:
|
||||
@@ -503,7 +503,7 @@ class BOM(WebsiteGenerator):
|
||||
),
|
||||
alert=True,
|
||||
)
|
||||
else:
|
||||
elif notify:
|
||||
frappe.msgprint(
|
||||
_("{0} not found for item {1}").format(self.rm_cost_as_per, arg["item_code"]),
|
||||
alert=True,
|
||||
@@ -909,7 +909,8 @@ class BOM(WebsiteGenerator):
|
||||
"conversion_factor": d.conversion_factor,
|
||||
"sourced_by_supplier": d.sourced_by_supplier,
|
||||
"is_phantom_item": d.is_phantom_item,
|
||||
}
|
||||
},
|
||||
notify=False,
|
||||
)
|
||||
|
||||
d.base_rate = flt(d.rate) * flt(self.conversion_rate)
|
||||
|
||||
Reference in New Issue
Block a user