From 1e11cb486d1df47d090c550b31088110429c0d56 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 14 Sep 2011 13:25:10 +0530 Subject: [PATCH] merging from master and usability fixes to setup --- .../Delivery Note-Receivable Voucher.txt | 29 ++++++++++++- .../Purchase Order-Payable Voucher.txt | 2 +- .../Purchase Receipt-Payable Voucher.txt | 2 +- .../Sales Order-Receivable Voucher.txt | 29 ++++++++++++- .../Sales Order-Indent/Sales Order-Indent.txt | 4 +- .../home/doctype/home_control/home_control.py | 41 ------------------- .../home/page/event_updates/event_updates.js | 27 +++++++----- .../home/page/event_updates/event_updates.py | 7 ++-- .../Enquiry-Quotation/Enquiry-Quotation.txt | 2 +- .../Lead-Customer/Lead-Customer.txt | 16 +++++++- .../Lead-Enquiry/Lead-Enquiry.txt | 2 +- .../Quotation-Sales Order.txt | 2 +- .../doctype/setup_control/setup_control.py | 5 ++- .../Receivable Voucher-Delivery Note.txt | 13 +++++- .../Sales Order-Delivery Note.txt | 11 ++++- index.html | 15 ++++--- 16 files changed, 133 insertions(+), 74 deletions(-) diff --git a/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt b/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt index ee94be8e4df..c06c3b80881 100644 --- a/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt +++ b/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:34', 'docstatus': 0, - 'modified': '2011-09-13 13:23:44', + 'modified': '2011-09-14 12:36:24', 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -125,6 +125,33 @@ 'to_field': 'incentives' }, + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'eval: flt(obj.qty) - flt(obj.billed_qty)', + 'map': 'Yes', + 'match_id': 1, + 'to_field': 'qty' + }, + + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'eval: (flt(obj.qty) - flt(obj.billed_qty)) * flt(obj.basic_rate)', + 'map': 'Yes', + 'match_id': 1, + 'to_field': 'amount' + }, + + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'eval: (flt(obj.qty) - flt(obj.billed_qty)) * flt(obj.export_rate)', + 'map': 'Yes', + 'match_id': 1, + 'to_field': 'export_amount' + }, + # Table Mapper Detail { 'doctype': 'Table Mapper Detail', diff --git a/erpnext/accounts/DocType Mapper/Purchase Order-Payable Voucher/Purchase Order-Payable Voucher.txt b/erpnext/accounts/DocType Mapper/Purchase Order-Payable Voucher/Purchase Order-Payable Voucher.txt index 17b63634c54..9527347367e 100644 --- a/erpnext/accounts/DocType Mapper/Purchase Order-Payable Voucher/Purchase Order-Payable Voucher.txt +++ b/erpnext/accounts/DocType Mapper/Purchase Order-Payable Voucher/Purchase Order-Payable Voucher.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:35', 'docstatus': 0, - 'modified': '2011-09-07 12:10:30', + 'modified': '2011-09-14 12:36:24', 'modified_by': 'Administrator', 'owner': 'Administrator' }, diff --git a/erpnext/accounts/DocType Mapper/Purchase Receipt-Payable Voucher/Purchase Receipt-Payable Voucher.txt b/erpnext/accounts/DocType Mapper/Purchase Receipt-Payable Voucher/Purchase Receipt-Payable Voucher.txt index d755954fc27..fae1006edfd 100644 --- a/erpnext/accounts/DocType Mapper/Purchase Receipt-Payable Voucher/Purchase Receipt-Payable Voucher.txt +++ b/erpnext/accounts/DocType Mapper/Purchase Receipt-Payable Voucher/Purchase Receipt-Payable Voucher.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:35', 'docstatus': 0, - 'modified': '2011-09-07 12:09:55', + 'modified': '2011-09-14 12:36:24', 'modified_by': 'Administrator', 'owner': 'Administrator' }, diff --git a/erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt b/erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt index 97b1cb2380e..ae0acedc55f 100644 --- a/erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt +++ b/erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:36', 'docstatus': 0, - 'modified': '2011-09-13 13:23:04', + 'modified': '2011-09-14 12:36:25', 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -136,6 +136,33 @@ 'to_field': 'incentives' }, + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'eval: flt(obj.qty) - flt(obj.billed_qty)', + 'map': 'Yes', + 'match_id': 1, + 'to_field': 'qty' + }, + + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'eval: (flt(obj.qty) - flt(obj.billed_qty)) * flt(obj.basic_rate)', + 'map': 'Yes', + 'match_id': 1, + 'to_field': 'amount' + }, + + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'eval: (flt(obj.qty) - flt(obj.billed_qty)) * flt(obj.export_rate)', + 'map': 'Yes', + 'match_id': 1, + 'to_field': 'export_amount' + }, + # Table Mapper Detail { 'doctype': 'Table Mapper Detail', diff --git a/erpnext/buying/DocType Mapper/Sales Order-Indent/Sales Order-Indent.txt b/erpnext/buying/DocType Mapper/Sales Order-Indent/Sales Order-Indent.txt index d32aeb63ce0..b4dafc9a2f7 100755 --- a/erpnext/buying/DocType Mapper/Sales Order-Indent/Sales Order-Indent.txt +++ b/erpnext/buying/DocType Mapper/Sales Order-Indent/Sales Order-Indent.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2011-05-05 15:58:13', + 'creation': '2011-05-20 10:07:55', 'docstatus': 0, - 'modified': '2011-05-05 16:20:10', + 'modified': '2011-09-14 12:36:25', 'modified_by': 'Administrator', 'owner': 'Administrator' }, diff --git a/erpnext/home/doctype/home_control/home_control.py b/erpnext/home/doctype/home_control/home_control.py index b25e420f2d3..8242e744315 100644 --- a/erpnext/home/doctype/home_control/home_control.py +++ b/erpnext/home/doctype/home_control/home_control.py @@ -121,24 +121,6 @@ class DocType: def get_dt_help(self,dt): return sql("select description from tabDocType where name=%s",dt)[0][0] or '' - - # ---------------------------------------------------------------------------------------- - def welcome_done(self): - if cint(get_defaults().get('welcome_done')): - return 'Yes' - else: - return 'No' - - def set_welcome_done(self): - set_default('welcome_done', '1') - - # Check Complete Registration - # ---------------------- - def registration_complete(self): - if cint(get_defaults().get('registration_complete')): - return 'Yes' - else: - return 'No' # get dashboard counts # -------------------- @@ -235,29 +217,6 @@ class DocType: # ------------------------------------------------------------------------------------------------------- - def get_status_details(self, arg=''): - # no of users online - count = sql("select count(distinct user) from tabSessions t2 where user not in ('Guest','Administrator') and TIMESTAMPDIFF(HOUR,t2.lastupdate,NOW()) <= 1") - - # unread messages - unread = sql("select count(t1.name) from `tabMail` t1, `tabMail Participant Details` t2 where t2.participant_name = '%s' and t2.parent = t1.name and (t2.read_status = 'No' or t2.read_status is NULL) and (t2.delete_status = 'No' or t2.delete_status is NULL) and t1.last_updated_by != t2.participant_name" % arg) - - # system messages - msg_id = webnotes.conn.get_global('system_message_id') - msg = '' - - if msg_id and msg_id != webnotes.conn.get_global('system_message_id', session['user']): - msg = webnotes.conn.get_global('system_message') - - return { - 'user_count': count and cint(count[0][0]) or 0, - 'unread': unread and cint(unread[0][0]) or 0, - 'system_message':msg, - 'registration_complete': self.registration_complete() - } - - # ------------------------------------------------------------------------------------------------------- - def dismiss_message(self, arg=''): msg_id = webnotes.conn.get_global('system_message_id') webnotes.conn.set_global('system_message_id', msg_id, session['user']) diff --git a/erpnext/home/page/event_updates/event_updates.js b/erpnext/home/page/event_updates/event_updates.js index 2eda138e9a4..b58a0c09146 100644 --- a/erpnext/home/page/event_updates/event_updates.js +++ b/erpnext/home/page/event_updates/event_updates.js @@ -610,7 +610,7 @@ pscript.home_make_status = function() { // complete registration if(in_list(user_roles,'System Manager')) { - pscript.complete_registration(r.registration_complete); + pscript.complete_registration(r.message.registration_complete); } // setup wizard @@ -630,17 +630,24 @@ pscript.complete_registration = function(is_complete) { d.no_cancel(); // Hide close image $dh(page_body.wntoolbar.wrapper); } - $($a(d.body,'div','', {margin:'8px', color:'#888'})).html('Company Name : '+locals['Control Panel']['Control Panel'].company_name); - d.make_body( - [ - ['Data','Company Abbreviation'], - ['Select','Fiscal Year Start Date'], - ['Select','Default Currency'], - ['Button','Save'], + d.make_body([ + ['Data','Company Name','Example: Your Company LLC'], + ['Data','Company Abbreviation', 'Example: YC (all your acconts will have this as a suffix)'], + ['Select','Fiscal Year Start Date'], + ['Select','Default Currency'], + ['Button','Save'], ]); - //d.widgets['Save'].disabled = true; // disable Save button + // if company name is set, set the input value + // and disable it + if(locals['Control Panel']['Control Panel'].company_name) { + d.widgets['Company Name'].value = locals['Control Panel']['Control Panel'].company_name; + d.widgets['Company Name'].disabled = 1; + } + + + //d.widgets['Save'].disabled = true; // disable Save button pscript.make_dialog_field(d); // submit details @@ -652,7 +659,7 @@ pscript.complete_registration = function(is_complete) { if(flag) { var args = [ - locals['Control Panel']['Control Panel'].company_name, + d.widgets['Company Name'].value, d.widgets['Company Abbreviation'].value, d.widgets['Fiscal Year Start Date'].value, d.widgets['Default Currency'].value diff --git a/erpnext/home/page/event_updates/event_updates.py b/erpnext/home/page/event_updates/event_updates.py index 11342734904..1d1d1b20404 100644 --- a/erpnext/home/page/event_updates/event_updates.py +++ b/erpnext/home/page/event_updates/event_updates.py @@ -24,7 +24,7 @@ def get_unread_messages(): # Get toolbar items # def get_status_details(arg=None): - from webnotes.utils import cint, date_diff, nowdate + from webnotes.utils import cint, date_diff, nowdate, get_defaults online = get_online_users() @@ -35,7 +35,8 @@ def get_status_details(arg=None): 'online_users': online or [], 'is_trial': webnotes.conn.get_global('is_trial'), 'days_to_expiry': (webnotes.conn.get_global('days_to_expiry') or '0'), - 'setup_status': get_setup_status() + 'setup_status': get_setup_status(), + 'registration_complete': cint(get_defaults('registration_complete')) and 'Yes' or 'No' } return ret @@ -53,7 +54,7 @@ def get_setup_status(): header = webnotes.conn.get_value('Control Panel', None, 'client_name') or '' if header.startswith('
'\ - +webnotes.conn.get_value('Control Panel', None, 'company_name')): + +(webnotes.conn.get_value('Control Panel', None, 'company_name') or '')): return False elif 'Banner Comes Here' in header: diff --git a/erpnext/selling/DocType Mapper/Enquiry-Quotation/Enquiry-Quotation.txt b/erpnext/selling/DocType Mapper/Enquiry-Quotation/Enquiry-Quotation.txt index 807a057e5e1..de6f60d965a 100644 --- a/erpnext/selling/DocType Mapper/Enquiry-Quotation/Enquiry-Quotation.txt +++ b/erpnext/selling/DocType Mapper/Enquiry-Quotation/Enquiry-Quotation.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:34', 'docstatus': 0, - 'modified': '2011-09-07 12:12:30', + 'modified': '2011-09-14 12:36:24', 'modified_by': 'Administrator', 'owner': 'Administrator' }, diff --git a/erpnext/selling/DocType Mapper/Lead-Customer/Lead-Customer.txt b/erpnext/selling/DocType Mapper/Lead-Customer/Lead-Customer.txt index 19a9f8a2e9b..268834a80f4 100644 --- a/erpnext/selling/DocType Mapper/Lead-Customer/Lead-Customer.txt +++ b/erpnext/selling/DocType Mapper/Lead-Customer/Lead-Customer.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:34', 'docstatus': 0, - 'modified': '2011-09-07 12:11:39', + 'modified': '2011-09-14 12:36:24', 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -63,6 +63,20 @@ 'to_field': 'customer_name' }, + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'contact_no', + 'to_field': 'phone_1' + }, + + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'fax', + 'to_field': 'fax_1' + }, + # Table Mapper Detail { 'doctype': 'Table Mapper Detail' diff --git a/erpnext/selling/DocType Mapper/Lead-Enquiry/Lead-Enquiry.txt b/erpnext/selling/DocType Mapper/Lead-Enquiry/Lead-Enquiry.txt index 742215b780d..5dc1c8fef14 100644 --- a/erpnext/selling/DocType Mapper/Lead-Enquiry/Lead-Enquiry.txt +++ b/erpnext/selling/DocType Mapper/Lead-Enquiry/Lead-Enquiry.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:34', 'docstatus': 0, - 'modified': '2011-09-07 12:11:00', + 'modified': '2011-09-14 12:36:24', 'modified_by': 'Administrator', 'owner': 'Administrator' }, diff --git a/erpnext/selling/DocType Mapper/Quotation-Sales Order/Quotation-Sales Order.txt b/erpnext/selling/DocType Mapper/Quotation-Sales Order/Quotation-Sales Order.txt index 5a529dde41b..feadb98f9a9 100644 --- a/erpnext/selling/DocType Mapper/Quotation-Sales Order/Quotation-Sales Order.txt +++ b/erpnext/selling/DocType Mapper/Quotation-Sales Order/Quotation-Sales Order.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:35', 'docstatus': 0, - 'modified': '2011-09-07 12:08:48', + 'modified': '2011-09-14 12:36:24', 'modified_by': 'Administrator', 'owner': 'Administrator' }, diff --git a/erpnext/setup/doctype/setup_control/setup_control.py b/erpnext/setup/doctype/setup_control/setup_control.py index 61e3a82cb3c..428c4345bd0 100644 --- a/erpnext/setup/doctype/setup_control/setup_control.py +++ b/erpnext/setup/doctype/setup_control/setup_control.py @@ -52,8 +52,7 @@ class DocType: self.currency = currency # Fiscal Year - master_dict = {'Fiscal Year':{'year':curr_fiscal_year, - 'year_start_date':fy_start_date}} + master_dict = {'Fiscal Year':{'year':curr_fiscal_year, 'year_start_date':fy_start_date}} self.create_records(master_dict) # Company @@ -85,6 +84,8 @@ class DocType: # Set Registration Complete set_default('registration_complete','1') + webnotes.msgprint("Great! Your company has now been created") + import webnotes.utils return webnotes.utils.get_defaults() diff --git a/erpnext/stock/DocType Mapper/Receivable Voucher-Delivery Note/Receivable Voucher-Delivery Note.txt b/erpnext/stock/DocType Mapper/Receivable Voucher-Delivery Note/Receivable Voucher-Delivery Note.txt index 3fd88db1f40..d0d4c174213 100755 --- a/erpnext/stock/DocType Mapper/Receivable Voucher-Delivery Note/Receivable Voucher-Delivery Note.txt +++ b/erpnext/stock/DocType Mapper/Receivable Voucher-Delivery Note/Receivable Voucher-Delivery Note.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2010-12-15 08:39:22', + 'creation': '2010-12-14 17:56:41', 'docstatus': 0, - 'modified': '2011-09-07 12:08:19', + 'modified': '2011-09-14 12:36:24', 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -107,6 +107,15 @@ 'to_field': 'naming_series' }, + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'customer_address', + 'map': 'Yes', + 'match_id': 0, + 'to_field': 'delivery_address' + }, + # Table Mapper Detail { 'doctype': 'Table Mapper Detail', diff --git a/erpnext/stock/DocType Mapper/Sales Order-Delivery Note/Sales Order-Delivery Note.txt b/erpnext/stock/DocType Mapper/Sales Order-Delivery Note/Sales Order-Delivery Note.txt index 9b08913252b..561019b4d7e 100644 --- a/erpnext/stock/DocType Mapper/Sales Order-Delivery Note/Sales Order-Delivery Note.txt +++ b/erpnext/stock/DocType Mapper/Sales Order-Delivery Note/Sales Order-Delivery Note.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:35', 'docstatus': 0, - 'modified': '2011-09-13 13:23:26', + 'modified': '2011-09-14 12:36:25', 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -221,6 +221,15 @@ 'to_field': 'incentives' }, + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'allocated_amount', + 'map': 'Yes', + 'match_id': 0, + 'to_field': 'customer_mobile_no' + }, + # Table Mapper Detail { 'doctype': 'Table Mapper Detail', diff --git a/index.html b/index.html index 36e7168aff8..f6d1007c306 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ ERPNext - +throw new SyntaxError('JSON.parse');};}}());wn.versions.check();wn.require("lib/js/lib/jquery.min.js");wn.require("lib/js/lib/history/history.min.js");$(document).bind('ready',function(){var base=window.location.href.split('#')[0];$.each($('a[softlink!="false"]'),function(i,v){if(v.href.substr(0,base.length)==base){var path=(v.href.substr(base.length));if(path.substr(0,1)!='#'){v.href=base+'#'+path;}}});if(!wn.settings.no_history&&window.location.hash){wn.page.set(window.location.hash.substr(1));}});