Merge pull request #16527 from nabinhait/bom-fix

fix: Default value for 'raw materials rate based on' in BOM
This commit is contained in:
Nabin Hait 2019-01-30 18:35:49 +05:30 committed by GitHub
commit 78fc158b39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -642,6 +642,7 @@
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 0, "columns": 0,
"default": "Valuation Rate",
"fieldname": "rm_cost_as_per", "fieldname": "rm_cost_as_per",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0, "hidden": 0,
@ -1977,7 +1978,7 @@
"issingle": 0, "issingle": 0,
"istable": 0, "istable": 0,
"max_attachments": 0, "max_attachments": 0,
"modified": "2018-12-13 17:45:44.843197", "modified": "2019-01-30 16:39:34.353721",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Manufacturing", "module": "Manufacturing",
"name": "BOM", "name": "BOM",

View File

@ -163,6 +163,8 @@ class BOM(WebsiteGenerator):
def get_rm_rate(self, arg): def get_rm_rate(self, arg):
""" Get raw material rate as per selected method, if bom exists takes bom cost """ """ Get raw material rate as per selected method, if bom exists takes bom cost """
rate = 0 rate = 0
if not self.rm_cost_as_per:
self.rm_cost_as_per = "Valuation Rate"
if arg.get('scrap_items'): if arg.get('scrap_items'):
rate = self.get_valuation_rate(arg) rate = self.get_valuation_rate(arg)