From 946e0de0cfc5a3a883d67a0e8305869c11b8e290 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 11 Jul 2013 18:26:00 +0530 Subject: [PATCH] [minor] [fix] --- .../payment_to_invoice_matching_tool.py | 2 +- selling/doctype/customer/customer.txt | 4 ++-- setup/doctype/company/company.py | 4 ++-- setup/page/setup/setup.js | 2 +- setup/page/setup/setup.py | 10 +++++----- startup/event_handlers.py | 2 +- utilities/doctype/address/address.txt | 4 ++-- utilities/transaction_base.py | 3 ++- 8 files changed, 16 insertions(+), 15 deletions(-) diff --git a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py index 07a97d8823..84f53282eb 100644 --- a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py +++ b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py @@ -164,5 +164,5 @@ def gl_entry_details(doctype, txt, searchfield, start, page_len, filters): %(mcond)s ORDER BY gle.posting_date desc, gle.voucher_no desc limit %(start)s, %(page_len)s""" % {dt:filters["dt"], acc:filters["acc"], - account_type: filters['account_type'], 'mcond':get_match_cond(doctype, searchfield) + account_type: filters['account_type'], 'mcond':get_match_cond(doctype, searchfield), 'txt': "%%%s%%" % txt,"start": start, "page_len": page_len}) \ No newline at end of file diff --git a/selling/doctype/customer/customer.txt b/selling/doctype/customer/customer.txt index 48c3d15273..5b8e323427 100644 --- a/selling/doctype/customer/customer.txt +++ b/selling/doctype/customer/customer.txt @@ -2,7 +2,7 @@ { "creation": "2013-06-11 14:26:44", "docstatus": 0, - "modified": "2013-07-05 14:34:09", + "modified": "2013-07-11 16:53:18", "modified_by": "Administrator", "owner": "Administrator" }, @@ -93,7 +93,7 @@ "fieldtype": "Link", "hidden": 0, "in_filter": 1, - "label": "Lead Ref", + "label": "From Lead", "no_copy": 1, "oldfieldname": "lead_name", "oldfieldtype": "Link", diff --git a/setup/doctype/company/company.py b/setup/doctype/company/company.py index 1835bf9ba7..ae2d8ee485 100644 --- a/setup/doctype/company/company.py +++ b/setup/doctype/company/company.py @@ -160,8 +160,8 @@ class DocType: ['Indirect Income','Income','Group','Yes','Income Account','Credit',self.doc.name,''], ['Source of Funds (Liabilities)','','Group','No','','Credit',self.doc.name,''], ['Capital Account','Source of Funds (Liabilities)','Group','No','','Credit',self.doc.name,''], - ['Reserves and Surplus','Capital Account','Group','No','','Credit',self.doc.name,''], - ['Shareholders Funds','Capital Account','Group','No','','Credit',self.doc.name,''], + ['Reserves and Surplus','Capital Account','Ledger','No','','Credit',self.doc.name,''], + ['Shareholders Funds','Capital Account','Ledger','No','','Credit',self.doc.name,''], ['Current Liabilities','Source of Funds (Liabilities)','Group','No','','Credit',self.doc.name,''], ['Accounts Payable','Current Liabilities','Group','No','','Credit',self.doc.name,''], ['Stock Liabilities','Current Liabilities','Group','No','','Credit',self.doc.name,''], diff --git a/setup/page/setup/setup.js b/setup/page/setup/setup.js index 1f5132c254..1844d5d03c 100644 --- a/setup/page/setup/setup.js +++ b/setup/page/setup/setup.js @@ -68,7 +68,7 @@ wn.pages['Setup'].onload = function(wrapper) { } else { var col = $(repl('
\ - %(count)s\ + %(count)s\ \ %(title)s\
', { diff --git a/setup/page/setup/setup.py b/setup/page/setup/setup.py index 2ca870de03..4bb1a20d64 100644 --- a/setup/page/setup/setup.py +++ b/setup/page/setup/setup.py @@ -9,7 +9,7 @@ items = [ }, {"doctype":"Company"}, {"doctype":"Fiscal Year"}, - {"doctype":"Currency"}, + {"doctype":"Currency", "filter": {"enabled": 1}}, { "type": "Section", "title": "Users and Permissions", @@ -48,8 +48,8 @@ items = [ {"doctype":"Customer Group", "tree": "Sales Browser"}, {"doctype":"Territory", "tree": "Sales Browser"}, {"doctype":"Sales Person", "tree": "Sales Browser"}, - {"doctype":"Contact"}, - {"doctype":"Address"}, + {"doctype":"Contact", "query": "select count(*) from `tabContact` where ifnull(customer, '')!=''"}, + {"doctype":"Address", "query": "select count(*) from `tabAddress` where ifnull(customer, '')!=''"}, { "title": "Selling Settings", "route": "Form/Selling Settings", "type": "Link", "icon": "icon-cog" }, ] @@ -58,8 +58,8 @@ items = [ "doctype": "Supplier", "dependencies": [ {"doctype":"Supplier Type"}, - {"doctype":"Contact"}, - {"doctype":"Address"}, + {"doctype":"Contact", "query": "select count(*) from `tabContact` where ifnull(supplier, '')!=''"}, + {"doctype":"Address", "query": "select count(*) from `tabAddress` where ifnull(supplier, '')!=''"}, { "title": "Buying Settings", "route": "Form/Buying Settings", "type": "Link", "icon": "icon-cog" }, ] diff --git a/startup/event_handlers.py b/startup/event_handlers.py index cd5cebff99..3f145421c0 100644 --- a/startup/event_handlers.py +++ b/startup/event_handlers.py @@ -30,7 +30,7 @@ def on_login_post_session(login_manager): login_manager.user=='Administrator' and '#8CA2B3' or '#1B750D') webnotes.conn.commit() - if webnotes.cookies.get("full_name"): + if webnotes.conn.get_value("Profile", webnotes.session.user, "user_type") == "Partner": from website.helpers.cart import set_cart_count set_cart_count() diff --git a/utilities/doctype/address/address.txt b/utilities/doctype/address/address.txt index edc7ac739e..09be67eb10 100644 --- a/utilities/doctype/address/address.txt +++ b/utilities/doctype/address/address.txt @@ -2,7 +2,7 @@ { "creation": "2013-01-10 16:34:32", "docstatus": 0, - "modified": "2013-07-05 14:24:00", + "modified": "2013-07-11 17:02:12", "modified_by": "Administrator", "owner": "Administrator" }, @@ -53,7 +53,7 @@ "fieldname": "address_title", "fieldtype": "Data", "label": "Address Title", - "reqd": 1 + "reqd": 0 }, { "doctype": "DocField", diff --git a/utilities/transaction_base.py b/utilities/transaction_base.py index db5cc072a0..cbcd4886cb 100644 --- a/utilities/transaction_base.py +++ b/utilities/transaction_base.py @@ -76,7 +76,8 @@ class TransactionBase(StatusUpdater): # fields prepended with default in Customer doctype for f in ['sales_partner', 'commission_rate', 'currency', 'price_list']: - out[f] = customer.fields.get("default_" + f) + if customer.fields.get("default_" + f): + out[f] = customer.fields.get("default_" + f) return out