Update item.py

This commit is contained in:
Nabin Hait 2017-02-10 17:12:48 +05:30 committed by GitHub
parent 2f09dc0e62
commit bdd470a6d1

View File

@ -451,7 +451,7 @@ class Item(WebsiteGenerator):
"valuation_method", "has_batch_no", "is_fixed_asset") "valuation_method", "has_batch_no", "is_fixed_asset")
vals = frappe.db.get_value("Item", self.name, to_check, as_dict=True) vals = frappe.db.get_value("Item", self.name, to_check, as_dict=True)
if not vals.get('valuation_method'): if not vals.get('valuation_method') and self.get('valuation_method'):
vals['valuation_method'] = frappe.db.get_single_value("Stock Settings", "valuation_method") or "FIFO" vals['valuation_method'] = frappe.db.get_single_value("Stock Settings", "valuation_method") or "FIFO"
if vals: if vals: