From 563662916aef86a7b34830eec8d7fa3a982b8063 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 10 Sep 2013 17:15:01 +0530 Subject: [PATCH 1/2] [fix] [minor] pos setting link validation --- accounts/doctype/pos_setting/pos_setting.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/accounts/doctype/pos_setting/pos_setting.py b/accounts/doctype/pos_setting/pos_setting.py index f805518124..183ebbe1d7 100755 --- a/accounts/doctype/pos_setting/pos_setting.py +++ b/accounts/doctype/pos_setting/pos_setting.py @@ -40,13 +40,15 @@ class DocType: msgprint(_("Expense Account is mandatory"), raise_exception=1) def validate_all_link_fields(self): - accounts = {"Account": [self.doc.cash_bank_account, self.doc.income_account, self.doc.expense_account], \ - "Cost Center": [self.doc.cost_center], "Warehouse": [self.doc.warehouse]} + accounts = {"Account": [self.doc.cash_bank_account, self.doc.income_account, + self.doc.expense_account], "Cost Center": [self.doc.cost_center], + "Warehouse": [self.doc.warehouse]} for link_dt, dn_list in accounts.items(): for link_dn in dn_list: - if not webnotes.conn.exists({"doctype": link_dt, "company": self.doc.company, "name": link_dn}): - msgprint(link_dn +_(" does not belong to ") + self.doc.company) + if link_dn and not webnotes.conn.exists({"doctype": link_dt, + "company": self.doc.company, "name": link_dn}): + webnotes.throw(link_dn +_(" does not belong to ") + self.doc.company) def on_update(self): webnotes.defaults.clear_default("is_pos") From 6e6ba9de1462f4a072be99f6dd87f8c52397dc7c Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 10 Sep 2013 17:20:42 +0530 Subject: [PATCH 2/2] [minor] label changed in sms settings --- setup/doctype/sms_settings/sms_settings.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setup/doctype/sms_settings/sms_settings.txt b/setup/doctype/sms_settings/sms_settings.txt index 5d10209cb2..20c0a62439 100755 --- a/setup/doctype/sms_settings/sms_settings.txt +++ b/setup/doctype/sms_settings/sms_settings.txt @@ -2,7 +2,7 @@ { "creation": "2013-01-10 16:34:24", "docstatus": 0, - "modified": "2013-07-05 14:55:50", + "modified": "2013-09-10 17:20:25", "modified_by": "Administrator", "owner": "Administrator" }, @@ -35,7 +35,7 @@ "parenttype": "DocType", "permlevel": 0, "read": 1, - "report": 1, + "report": 0, "role": "System Manager", "submit": 0, "write": 1 @@ -78,7 +78,6 @@ "doctype": "DocField", "fieldname": "static_parameters", "fieldtype": "Column Break", - "label": "Static Parameters", "width": "50%" }, { @@ -86,7 +85,7 @@ "doctype": "DocField", "fieldname": "static_parameter_details", "fieldtype": "Table", - "label": "SMS Parameters", + "label": "Static Parameters", "options": "SMS Parameter" }, {