frappe/frappe#478, removed instances of .fields

This commit is contained in:
Rushabh Mehta
2014-03-31 23:37:40 +05:30
parent 231f6a5b58
commit f2227d033c
32 changed files with 61 additions and 63 deletions

View File

@@ -223,11 +223,11 @@ class StockController(AccountsController):
make_gl_entries(gl_entries)
def check_expense_account(self, item):
if item.fields.has_key("expense_account") and not item.expense_account:
if item.meta.has_field("expense_account") and not item.expense_account:
msgprint(_("""Expense/Difference account is mandatory for item: """) + item.item_code,
raise_exception=1)
if item.fields.has_key("expense_account") and not item.cost_center:
if item.meta.has_field("expense_account") and not item.cost_center:
msgprint(_("""Cost Center is mandatory for item: """) + item.item_code,
raise_exception=1)