This commit is contained in:
Nabin Hait
2014-04-03 17:38:54 +05:30
parent 99f914b782
commit 365ae27acf
17 changed files with 50 additions and 50 deletions

View File

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