From ea925d26a867c492d6066a56d899f27b77918ef5 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 10 Aug 2015 12:56:58 +0530 Subject: [PATCH] [fix] Made expense account non-mandatory in POS Profile --- erpnext/accounts/doctype/pos_profile/pos_profile.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.py b/erpnext/accounts/doctype/pos_profile/pos_profile.py index eeb2bcfc30..98a8509792 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.py +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.py @@ -11,7 +11,6 @@ from frappe.model.document import Document class POSProfile(Document): def validate(self): self.check_for_duplicate() - self.validate_expense_account() self.validate_all_link_fields() def check_for_duplicate(self): @@ -26,11 +25,6 @@ class POSProfile(Document): msgprint(_("Global POS Profile {0} already created for company {1}").format(res[0][0], self.company), raise_exception=1) - def validate_expense_account(self): - if cint(frappe.defaults.get_global_default("auto_accounting_for_stock")) \ - and not self.expense_account: - msgprint(_("Expense Account is mandatory"), raise_exception=1) - def validate_all_link_fields(self): accounts = {"Account": [self.cash_bank_account, self.income_account, self.expense_account], "Cost Center": [self.cost_center],