Merge pull request #7712 from rohitwaghchaure/minor_fix_item_valuation_method

[Fix] Valuation method changing issue in the item
This commit is contained in:
Nabin Hait 2017-02-13 15:42:22 +05:30 committed by GitHub
commit 89b6c47b2e

View File

@ -451,6 +451,8 @@ class Item(WebsiteGenerator):
"valuation_method", "has_batch_no", "is_fixed_asset")
vals = frappe.db.get_value("Item", self.name, to_check, as_dict=True)
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"
if vals:
for key in to_check: