From 0b1567c51c2be5f83e1e38f98d8958120f5dcfe3 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 3 Jun 2013 17:39:54 +0530 Subject: [PATCH 1/4] [docs] updated doctype generator, started page generator, and cleanups --- accounts/doctype/account/account.py | 5 ++++- accounts/page/accounts_browser/README.md | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 accounts/page/accounts_browser/README.md diff --git a/accounts/doctype/account/account.py b/accounts/doctype/account/account.py index bdc26e46ce2..45b02a8d15f 100644 --- a/accounts/doctype/account/account.py +++ b/accounts/doctype/account/account.py @@ -29,6 +29,7 @@ class DocType: self.nsm_parent_field = 'parent_account' def autoname(self): + """Append abbreviation to company on naming""" self.doc.name = self.doc.account_name.strip() + ' - ' + \ webnotes.conn.get_value("Company", self.doc.company, "abbr") @@ -37,6 +38,7 @@ class DocType: return {'address': address} def validate_master_name(self): + """Remind to add master name""" if (self.doc.master_type == 'Customer' or self.doc.master_type == 'Supplier') \ and not self.doc.master_name: msgprint("Message: Please enter Master Name once the account is created.") @@ -62,6 +64,7 @@ class DocType: self.doc.debit_or_credit = par[0][3] def validate_max_root_accounts(self): + """Raise exception if there are more than 4 root accounts""" if webnotes.conn.sql("""select count(*) from tabAccount where company=%s and ifnull(parent_account,'')='' and docstatus != 2""", self.doc.company)[0][0] > 4: @@ -69,7 +72,6 @@ class DocType: raise_exception=1) def validate_duplicate_account(self): - if self.doc.fields.get('__islocal') or not self.doc.name: company_abbr = webnotes.conn.get_value("Company", self.doc.company, "abbr") if sql("""select name from tabAccount where name=%s""", @@ -134,6 +136,7 @@ class DocType: self.doc.parent_account = '' def update_nsm_model(self): + """update lft, rgt indices for nested set model""" import webnotes import webnotes.utils.nestedset webnotes.utils.nestedset.update_nsm(self) diff --git a/accounts/page/accounts_browser/README.md b/accounts/page/accounts_browser/README.md new file mode 100644 index 00000000000..b8795613fcb --- /dev/null +++ b/accounts/page/accounts_browser/README.md @@ -0,0 +1 @@ +Tree view browser for Chart of Accounts and Chart of Cost Centers \ No newline at end of file From 8fefeaf1bd939fa2882407e52c3b56d672c547fc Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 4 Jun 2013 11:23:42 +0530 Subject: [PATCH 2/4] [ui] removed links to old search_criteria and Report2 is now Report --- buying/page/purchase_analytics/purchase_analytics.js | 2 +- home/page/activity/activity.js | 2 +- hr/page/hr_home/hr_home.js | 2 +- stock/page/stock_home/stock_home.js | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/buying/page/purchase_analytics/purchase_analytics.js b/buying/page/purchase_analytics/purchase_analytics.js index 857a335ae7b..96b88b31159 100644 --- a/buying/page/purchase_analytics/purchase_analytics.js +++ b/buying/page/purchase_analytics/purchase_analytics.js @@ -49,7 +49,7 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ item_key: "supplier", parent_field: "parent_supplier_type", formatter: function(item) { - // return repl('%(value)s', { + // return repl('%(value)s', { // value: item.name, // enc_value: encodeURIComponent(item.name) // }); diff --git a/home/page/activity/activity.js b/home/page/activity/activity.js index cf7a06ff007..e412a23650b 100644 --- a/home/page/activity/activity.js +++ b/home/page/activity/activity.js @@ -19,7 +19,7 @@ wn.pages['activity'].onload = function(wrapper) { // Build Report Button if(wn.boot.profile.can_get_report.indexOf("Feed")!=-1) { wrapper.appframe.add_button('Build Report', function() { - wn.set_route('Report2', "Feed"); + wn.set_route('Report', "Feed"); }, 'icon-th') } } diff --git a/hr/page/hr_home/hr_home.js b/hr/page/hr_home/hr_home.js index 060d60a10c1..bee05f6a11f 100644 --- a/hr/page/hr_home/hr_home.js +++ b/hr/page/hr_home/hr_home.js @@ -175,7 +175,7 @@ wn.module_page["HR"] = [ }, { "label":wn._("Employee Information"), - route: "Report2/Employee/Employee Information" + route: "Report/Employee/Employee Information" }, { "label":wn._("Monthly Salary Register"), diff --git a/stock/page/stock_home/stock_home.js b/stock/page/stock_home/stock_home.js index 5babf154666..fd1f977be7b 100644 --- a/stock/page/stock_home/stock_home.js +++ b/stock/page/stock_home/stock_home.js @@ -164,7 +164,7 @@ wn.module_page["Stock"] = [ items: [ { "label":wn._("Stock Ledger"), - route: "Report2/Stock Ledger Entry/Stock Ledger", + route: "Report/Stock Ledger Entry/Stock Ledger", doctype: "Stock Ledger Entry" }, { @@ -179,17 +179,17 @@ wn.module_page["Stock"] = [ }, { "label":wn._("Serial No Service Contract Expiry"), - route: "Report2/Serial No/Serial No Service Contract Expiry", + route: "Report/Serial No/Serial No Service Contract Expiry", doctype: "Serial No" }, { "label":wn._("Serial No Status"), - route: "Report2/Serial No/Serial No Status", + route: "Report/Serial No/Serial No Status", doctype: "Serial No" }, { "label":wn._("Serial No Warranty Expiry"), - route: "Report2/Serial No/Serial No Warranty Expiry", + route: "Report/Serial No/Serial No Warranty Expiry", doctype: "Serial No" }, { From f8d2ff30ea560ac128d7cc5f0b0139e0a23d6959 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 4 Jun 2013 14:41:49 +0530 Subject: [PATCH 3/4] [ui] flattified desktop icons --- config.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/config.json b/config.json index 40b526ce6ab..4080f14f69a 100644 --- a/config.json +++ b/config.json @@ -2,69 +2,69 @@ "modules": { "Selling": { "link": "selling-home", - "color": "#3f4901", + "color": "#1abc9c", "icon": "icon-tag", "type": "module" }, "Accounts": { "link": "accounts-home", - "color": "#025770", + "color": "#3498db", "icon": "icon-money", "type": "module" }, "Stock": { "type": "module", "link": "stock-home", - "color": "#a66a02", + "color": "#f39c12", "icon": "icon-truck" }, "Buying": { "type": "module", "link": "buying-home", - "color": "#8F0222", + "color": "#c0392b", "icon": "icon-shopping-cart" }, "Support": { "type": "module", "link": "support-home", - "color": "#410169", + "color": "#2c3e50", "icon": "icon-phone" }, "Projects": { "type": "module", "link": "projects-home", - "color": "#473b7f", + "color": "#8e44ad", "icon": "icon-tasks" }, "Manufacturing": { "type": "module", "link": "manufacturing-home", - "color": "#590116", - "icon": "icon-magic" + "color": "#7f8c8d", + "icon": "icon-cogs" }, "Website": { "type": "module", "link": "website-home", - "color": "#968c00", + "color": "#16a085", "icon": "icon-globe" }, "HR": { "type": "module", "link": "hr-home", - "color": "#018d6c", + "color": "#2ecc71", "label": "Human Resources", "icon": "icon-group" }, "Setup": { "type": "setup", "link": "Setup", - "color": "#484848", + "color": "#bdc3c7", "icon": "icon-wrench" }, "Activity": { "type": "page", "link": "activity", - "color": "#633501", + "color": "#e67e22", "icon": "icon-play", "label": "Activity" }, @@ -72,9 +72,9 @@ "type": "list", "doctype": "Note", "link": "List/Note", - "color": "#01372b", + "color": "#95a5a6", "label": "Notes", - "icon": "icon-question-sign" + "icon": "icon-file-alt" } }, "web": { From dc18529a7fefcfcf82d3c70afff036d5f90f27f6 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 4 Jun 2013 15:43:19 +0530 Subject: [PATCH 4/4] [splash] added erpnext-2013 icon --- public/images/erpnext-2013.svg | 171 +++++++++++++++++++++++++++++++++ public/images/favicon.ico | Bin 1150 -> 1150 bytes 2 files changed, 171 insertions(+) create mode 100644 public/images/erpnext-2013.svg diff --git a/public/images/erpnext-2013.svg b/public/images/erpnext-2013.svg new file mode 100644 index 00000000000..6a4c4453318 --- /dev/null +++ b/public/images/erpnext-2013.svg @@ -0,0 +1,171 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/favicon.ico b/public/images/favicon.ico index 045b1bddd20462f229d5443a7d5eeba7dbd38641..c50923e247091d2d3c23fed5bf753a6262e55e3a 100644 GIT binary patch literal 1150 zcmZvZT}V@57{^a6=mTlGMPOzPihVRa!?{InezZkUm|7`b7?uW+USxVBM1~u~5-fs< zOfj%-Bv2>mjrpB(rdvqr)}~H8yVzD!Xq$|@5c|J+X7hu?@4V0ZKhN(uFXvFy0bH@M z6z&45>>x#*peRZV5Fy#hu}~DAjm2-Vx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