From 996e469562249c876f9cebf23a882c09b8bec23b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 2 Apr 2013 14:26:26 +0530 Subject: [PATCH 1/8] added country Aruba and currency AWG --- .../p02_add_country_and_currency.py | 20 +++++++++++++++++++ patches/patch_list.py | 1 + 2 files changed, 21 insertions(+) create mode 100644 patches/april_2013/p02_add_country_and_currency.py diff --git a/patches/april_2013/p02_add_country_and_currency.py b/patches/april_2013/p02_add_country_and_currency.py new file mode 100644 index 0000000000..ae48a4dbc7 --- /dev/null +++ b/patches/april_2013/p02_add_country_and_currency.py @@ -0,0 +1,20 @@ +import webnotes +def execute(): + if not webnotes.conn.exists("Country", "Aruba"): + webnotes.bean({ + "doctype": "Country", + "country_name": "Aruba", + "time_zones": "America/Aruba", + "date_format": "mm-dd-yyyy" + }).insert() + + if not webnotes.conn.exists("Currency", "AWG"): + webnotes.bean({ + "doctype": "Currency", + "currency_name": "AWG", + "fraction": "Cent", + "fraction_units": 100, + "symbol": "Afl", + "number_format": "#,###.##" + }).insert() + \ No newline at end of file diff --git a/patches/patch_list.py b/patches/patch_list.py index 544fc957e9..b2a5140fc8 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -228,4 +228,5 @@ patch_list = [ "patches.march_2013.p11_update_attach_files", "patches.march_2013.p12_set_item_tax_rate_in_json", "patches.april_2013.p01_update_serial_no_valuation_rate", + "patches.april_2013.p02_add_country_and_currency", ] \ No newline at end of file From ff3106c7d47d9bbe9c6e49a54b481dd81734a110 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 2 Apr 2013 17:44:50 +0530 Subject: [PATCH 2/8] [stock reco] improved validation message --- stock/doctype/stock_reconciliation/stock_reconciliation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stock/doctype/stock_reconciliation/stock_reconciliation.py b/stock/doctype/stock_reconciliation/stock_reconciliation.py index 56041797d5..f32a78bd9e 100644 --- a/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -145,11 +145,12 @@ class DocType(StockController): "posting_date": self.doc.posting_date, "posting_time": self.doc.posting_time }) - + # check valuation rate mandatory if row.qty != "" and not row.valuation_rate and \ flt(previous_sle.get("qty_after_transaction")) <= 0: webnotes.msgprint(_("As existing qty for item: ") + row.item_code + + _(" at warehouse: ") + row.warehouse + _(" is less than equals to zero in the system, \ valuation rate is mandatory for this item"), raise_exception=1) From 1e3fc88940afe49d80a79ccfbbad5ab1465e9035 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 2 Apr 2013 18:13:20 +0530 Subject: [PATCH 3/8] [quotation][improvement] when made from lead --- .../p03_fixes_for_lead_in_quotation.py | 15 ++ patches/patch_list.py | 5 + .../Quotation Classic/Quotation Classic.txt | 7 +- .../Quotation Modern/Quotation Modern.txt | 7 +- .../Quotation Spartan/Quotation Spartan.txt | 7 +- selling/doctype/opportunity/opportunity.js | 22 ++- selling/doctype/opportunity/opportunity.py | 4 +- selling/doctype/opportunity/opportunity.txt | 69 +++++--- selling/doctype/quotation/quotation.js | 19 ++- selling/doctype/quotation/quotation.txt | 154 +++++++++++------- utilities/transaction_base.py | 4 +- 11 files changed, 198 insertions(+), 115 deletions(-) create mode 100644 patches/april_2013/p03_fixes_for_lead_in_quotation.py diff --git a/patches/april_2013/p03_fixes_for_lead_in_quotation.py b/patches/april_2013/p03_fixes_for_lead_in_quotation.py new file mode 100644 index 0000000000..21a57faeb9 --- /dev/null +++ b/patches/april_2013/p03_fixes_for_lead_in_quotation.py @@ -0,0 +1,15 @@ +import webnotes +def execute(): + webnotes.conn.sql("""update `tabQuotation` set customer_name = organization + where quotation_to = 'Lead' and ifnull(lead, '') != '' + and ifnull(organization, '') != ''""") + + webnotes.conn.sql("""update `tabQuotation` set customer_name = lead_name + where quotation_to = 'Lead' and ifnull(lead, '') != '' + and ifnull(organization, '') = '' and ifnull(lead_name, '') != ''""") + + webnotes.conn.sql("""update `tabQuotation` set contact_display = lead_name + where quotation_to = 'Lead' and ifnull(lead, '') != '' and ifnull(lead_name, '') != ''""") + + webnotes.conn.sql("""update `tabOpportunity` set contact_display = lead_name + where enquiry_from = 'Lead' and ifnull(lead, '') != '' and ifnull(lead_name, '') != ''""") \ No newline at end of file diff --git a/patches/patch_list.py b/patches/patch_list.py index b2a5140fc8..b0fc97a269 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -229,4 +229,9 @@ patch_list = [ "patches.march_2013.p12_set_item_tax_rate_in_json", "patches.april_2013.p01_update_serial_no_valuation_rate", "patches.april_2013.p02_add_country_and_currency", + "patches.april_2013.p03_fixes_for_lead_in_quotation", + 'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Classic") # 2013-04-02', + 'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Modern") # 2013-04-02', + 'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Spartan") # 2013-04-02', + ] \ No newline at end of file diff --git a/selling/Print Format/Quotation Classic/Quotation Classic.txt b/selling/Print Format/Quotation Classic/Quotation Classic.txt index e6ea84d2ff..0cb2caac35 100644 --- a/selling/Print Format/Quotation Classic/Quotation Classic.txt +++ b/selling/Print Format/Quotation Classic/Quotation Classic.txt @@ -1,17 +1,18 @@ [ { - "creation": "2013-02-19 16:00:58", + "creation": "2013-02-19 16:00:26", "docstatus": 0, - "modified": "2013-03-05 11:57:20", + "modified": "2013-04-02 17:52:30", "modified_by": "Administrator", "owner": "Administrator" }, { "doc_type": "Quotation", "doctype": "Print Format", - "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n\n", + "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n\n", "module": "Selling", "name": "__common__", + "print_format_type": "Client", "standard": "Yes" }, { diff --git a/selling/Print Format/Quotation Modern/Quotation Modern.txt b/selling/Print Format/Quotation Modern/Quotation Modern.txt index 1919b93add..0b22fdbaa1 100644 --- a/selling/Print Format/Quotation Modern/Quotation Modern.txt +++ b/selling/Print Format/Quotation Modern/Quotation Modern.txt @@ -1,17 +1,18 @@ [ { - "creation": "2013-02-19 16:23:17", + "creation": "2013-02-19 16:22:50", "docstatus": 0, - "modified": "2013-03-05 11:57:53", + "modified": "2013-04-02 17:53:14", "modified_by": "Administrator", "owner": "Administrator" }, { "doc_type": "Quotation", "doctype": "Print Format", - "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n\n", + "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n\n", "module": "Selling", "name": "__common__", + "print_format_type": "Client", "standard": "Yes" }, { diff --git a/selling/Print Format/Quotation Spartan/Quotation Spartan.txt b/selling/Print Format/Quotation Spartan/Quotation Spartan.txt index 461bc0b7b1..740370e7b1 100644 --- a/selling/Print Format/Quotation Spartan/Quotation Spartan.txt +++ b/selling/Print Format/Quotation Spartan/Quotation Spartan.txt @@ -1,17 +1,18 @@ [ { - "creation": "2013-02-19 16:23:17", + "creation": "2013-02-19 16:22:50", "docstatus": 0, - "modified": "2013-03-05 11:56:50", + "modified": "2013-04-02 17:51:46", "modified_by": "Administrator", "owner": "Administrator" }, { "doc_type": "Quotation", "doctype": "Print Format", - "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n\n", + "html": "\n\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n
\n\n", "module": "Selling", "name": "__common__", + "print_format_type": "Client", "standard": "Yes" }, { diff --git a/selling/doctype/opportunity/opportunity.js b/selling/doctype/opportunity/opportunity.js index 664b88d8cf..dc322ebf58 100644 --- a/selling/doctype/opportunity/opportunity.js +++ b/selling/doctype/opportunity/opportunity.js @@ -34,7 +34,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn){ // =============================================================== cur_frm.cscript.onload = function(doc, cdt, cdn) { - if(!doc.enquiry_from) hide_field(['customer', 'customer_address', 'contact_person', 'customer_name','lead', 'lead_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory', 'customer_group']); + if(!doc.enquiry_from) hide_field(['customer', 'customer_address', 'contact_person', 'customer_name','lead', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory', 'customer_group']); if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'}); if(!doc.date) doc.transaction_date = date.obj_to_str(new Date()); if(!doc.company && sys_defaults.company) set_multiple(cdt,cdn,{company:sys_defaults.company}); @@ -42,10 +42,10 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { if(doc.enquiry_from) { if(doc.enquiry_from == 'Customer') { - hide_field(['lead', 'lead_name']); + hide_field('lead'); } else if (doc.enquiry_from == 'Lead') { - hide_field(['customer', 'customer_address', 'contact_person', 'customer_name', 'contact_display', 'customer_group']); + hide_field(['customer', 'customer_address', 'contact_person', 'customer_group']); } } @@ -85,13 +85,14 @@ cur_frm.cscript.enquiry_from = function(doc,cdt,cdn){ cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){ if(doc.enquiry_from == 'Lead'){ unhide_field(['lead']); - hide_field(['lead_name','customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']); - doc.lead = doc.lead_name = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = ""; + hide_field(['customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']); + doc.lead = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = ""; } else if(doc.enquiry_from == 'Customer'){ unhide_field(['customer']); - hide_field(['lead','lead_name','address_display','contact_display','contact_mobile','contact_email','territory', 'customer_group']); - doc.lead = doc.lead_name = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = ""; + hide_field(['lead', 'address_display', 'contact_display', 'contact_mobile', + 'contact_email', 'territory', 'customer_group']); + doc.lead = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = ""; } } @@ -154,8 +155,11 @@ cur_frm.fields_dict['lead'].get_query = function(doc,cdt,cdn){ cur_frm.cscript.lead = function(doc, cdt, cdn) { cur_frm.toggle_display("contact_info", doc.customer || doc.lead); - if(doc.lead) get_server_fields('get_lead_details', doc.lead,'', doc, cdt, cdn, 1); - if(doc.lead) unhide_field(['lead_name','address_display','contact_mobile','contact_email','territory']); + if(doc.lead) { + get_server_fields('get_lead_details', doc.lead,'', doc, cdt, cdn, 1); + unhide_field(['customer_name', 'address_display','contact_mobile', 'contact_email', + 'territory']); + } } diff --git a/selling/doctype/opportunity/opportunity.py b/selling/doctype/opportunity/opportunity.py index 9da5e6adad..75a7cd270d 100644 --- a/selling/doctype/opportunity/opportunity.py +++ b/selling/doctype/opportunity/opportunity.py @@ -98,8 +98,8 @@ class DocType(TransactionBase): else: desc = 'Contact customer '+cstr(self.doc.customer) elif self.doc.lead: - if self.doc.lead_name: - desc = 'Contact '+cstr(self.doc.lead_name) + if self.doc.contact_display: + desc = 'Contact '+cstr(self.doc.contact_display) else: desc = 'Contact lead '+cstr(self.doc.lead) desc = desc+ '. By : ' + cstr(self.doc.contact_by) diff --git a/selling/doctype/opportunity/opportunity.txt b/selling/doctype/opportunity/opportunity.txt index 573f17e351..da085a390c 100644 --- a/selling/doctype/opportunity/opportunity.txt +++ b/selling/doctype/opportunity/opportunity.txt @@ -1,8 +1,8 @@ [ { - "creation": "2013-01-23 19:57:18", + "creation": "2013-03-07 18:50:30", "docstatus": 0, - "modified": "2013-01-29 14:23:07", + "modified": "2013-04-02 16:28:08", "modified_by": "Administrator", "owner": "Administrator" }, @@ -53,6 +53,7 @@ "oldfieldname": "naming_series", "oldfieldtype": "Select", "options": "OPPT", + "read_only": 0, "reqd": 1 }, { @@ -64,6 +65,7 @@ "oldfieldtype": "Select", "options": "\nLead\nCustomer", "print_hide": 1, + "read_only": 0, "report_hide": 0, "reqd": 1 }, @@ -79,6 +81,7 @@ "oldfieldtype": "Link", "options": "Customer", "print_hide": 1, + "read_only": 0, "reqd": 0, "search_index": 0 }, @@ -93,13 +96,15 @@ "oldfieldname": "lead", "oldfieldtype": "Link", "options": "Lead", - "print_hide": 1 + "print_hide": 1, + "read_only": 0 }, { "doctype": "DocField", "fieldname": "column_break0", "fieldtype": "Column Break", "oldfieldtype": "Column Break", + "read_only": 0, "width": "50%" }, { @@ -124,6 +129,7 @@ "oldfieldname": "enquiry_type", "oldfieldtype": "Select", "options": "\nSales\nMaintenance", + "read_only": 0, "reqd": 1 }, { @@ -131,7 +137,8 @@ "fieldname": "items", "fieldtype": "Section Break", "label": "Items", - "oldfieldtype": "Section Break" + "oldfieldtype": "Section Break", + "read_only": 0 }, { "description": "Items which do not exist in Item master can also be entered on customer's request", @@ -141,14 +148,16 @@ "label": "Opportunity Items", "oldfieldname": "enquiry_details", "oldfieldtype": "Table", - "options": "Opportunity Item" + "options": "Opportunity Item", + "read_only": 0 }, { "description": "Keep a track of communication related to this enquiry which will help for future reference.", "doctype": "DocField", "fieldname": "communication_history", "fieldtype": "Section Break", - "oldfieldtype": "Section Break" + "oldfieldtype": "Section Break", + "read_only": 0 }, { "allow_on_submit": 1, @@ -157,13 +166,15 @@ "fieldtype": "HTML", "label": "Communication HTML", "oldfieldname": "follow_up", - "oldfieldtype": "Table" + "oldfieldtype": "Table", + "read_only": 0 }, { "doctype": "DocField", "fieldname": "contact_info", "fieldtype": "Section Break", - "label": "Contact Info" + "label": "Contact Info", + "read_only": 0 }, { "doctype": "DocField", @@ -172,7 +183,8 @@ "in_filter": 1, "label": "Contact Person", "options": "Contact", - "print_hide": 1 + "print_hide": 1, + "read_only": 0 }, { "doctype": "DocField", @@ -181,7 +193,8 @@ "in_filter": 1, "label": "Customer Address", "options": "Address", - "print_hide": 1 + "print_hide": 1, + "read_only": 0 }, { "doctype": "DocField", @@ -204,7 +217,8 @@ { "doctype": "DocField", "fieldname": "column_break3", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "read_only": 0 }, { "doctype": "DocField", @@ -227,16 +241,6 @@ "label": "Contact Mobile No", "read_only": 1 }, - { - "doctype": "DocField", - "fieldname": "lead_name", - "fieldtype": "Data", - "hidden": 0, - "label": "Name", - "oldfieldname": "lead_name", - "oldfieldtype": "Data", - "read_only": 1 - }, { "depends_on": "eval:doc.enquiry_from==\"Customer\"", "description": "To manage Territory, click here", @@ -250,6 +254,7 @@ "oldfieldtype": "Link", "options": "Customer Group", "print_hide": 1, + "read_only": 0, "reqd": 0, "search_index": 1 }, @@ -262,6 +267,7 @@ "label": "Territory", "options": "Territory", "print_hide": 1, + "read_only": 0, "reqd": 0, "search_index": 1 }, @@ -271,13 +277,15 @@ "fieldname": "more_info", "fieldtype": "Section Break", "label": "More Info", - "oldfieldtype": "Section Break" + "oldfieldtype": "Section Break", + "read_only": 0 }, { "doctype": "DocField", "fieldname": "column_break1", "fieldtype": "Column Break", "oldfieldtype": "Column Break", + "read_only": 0, "width": "50%" }, { @@ -289,6 +297,7 @@ "label": "Opportunity Date", "oldfieldname": "transaction_date", "oldfieldtype": "Date", + "read_only": 0, "reqd": 1, "width": "50px" }, @@ -302,6 +311,7 @@ "oldfieldtype": "Select", "options": "link:Fiscal Year", "print_hide": 1, + "read_only": 0, "reqd": 1, "search_index": 1 }, @@ -312,7 +322,8 @@ "label": "Source", "oldfieldname": "source", "oldfieldtype": "Select", - "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign\nWalk In" + "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign\nWalk In", + "read_only": 0 }, { "description": "Enter name of campaign if source of enquiry is campaign", @@ -322,7 +333,8 @@ "label": "Campaign", "oldfieldname": "campaign", "oldfieldtype": "Link", - "options": "Campaign" + "options": "Campaign", + "read_only": 0 }, { "depends_on": "eval:!doc.__islocal", @@ -346,6 +358,7 @@ "oldfieldtype": "Link", "options": "Company", "print_hide": 1, + "read_only": 0, "reqd": 1, "search_index": 1 }, @@ -354,6 +367,7 @@ "fieldname": "column_break2", "fieldtype": "Column Break", "oldfieldtype": "Column Break", + "read_only": 0, "width": "50%" }, { @@ -366,6 +380,7 @@ "oldfieldname": "contact_by", "oldfieldtype": "Link", "options": "Profile", + "read_only": 0, "width": "75px" }, { @@ -375,7 +390,8 @@ "fieldtype": "Date", "label": "Next Contact Date", "oldfieldname": "contact_date", - "oldfieldtype": "Date" + "oldfieldtype": "Date", + "read_only": 0 }, { "allow_on_submit": 0, @@ -398,7 +414,8 @@ "label": "To Discuss", "no_copy": 1, "oldfieldname": "to_discuss", - "oldfieldtype": "Small Text" + "oldfieldtype": "Small Text", + "read_only": 0 }, { "doctype": "DocField", diff --git a/selling/doctype/quotation/quotation.js b/selling/doctype/quotation/quotation.js index cf7b515d08..078baf1997 100644 --- a/selling/doctype/quotation/quotation.js +++ b/selling/doctype/quotation/quotation.js @@ -29,7 +29,10 @@ wn.require('app/utilities/doctype/sms_control/sms_control.js'); // =================================================================================== cur_frm.cscript.onload = function(doc, cdt, cdn) { cur_frm.cscript.manage_rounded_total(); - if(!doc.quotation_to) hide_field(['customer','customer_address','contact_person','customer_name','lead', 'lead_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory', 'customer_group']); + if(!doc.quotation_to) + hide_field(['customer','customer_address','contact_person','customer_name','lead', + 'address_display', 'contact_display', 'contact_mobile', 'contact_email', + 'territory', 'customer_group']); if(!doc.price_list_name) set_multiple(cdt,cdn,{price_list_name:sys_defaults.price_list_name}); if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'}); if(!doc.transaction_date) set_multiple(cdt,cdn,{transaction_date:get_today()}); @@ -42,10 +45,10 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { if(doc.quotation_to) { if(doc.quotation_to == 'Customer') { - hide_field(['lead', 'lead_name', 'organization']); + hide_field('lead'); } else if (doc.quotation_to == 'Lead') { - hide_field(['customer','customer_address','contact_person', 'customer_name','contact_display', 'customer_group']); + hide_field(['customer', 'customer_address', 'contact_person', 'customer_group']); } } } @@ -61,13 +64,13 @@ cur_frm.cscript.onload_post_render = function(doc, dt, dn) { // hide - unhide fields based on lead or customer.. // ======================================================================================================================= cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){ - hide_field(['lead', 'lead_name','customer','customer_address','contact_person', + hide_field(['lead', 'customer','customer_address','contact_person', 'customer_name','address_display','contact_display','contact_mobile','contact_email', - 'territory','customer_group', 'organization']); + 'territory','customer_group']); if(doc.quotation_to == 'Lead') unhide_field(['lead']); else if(doc.quotation_to == 'Customer') unhide_field(['customer']); - doc.lead = doc.lead_name = doc.customer = doc.customer_name = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = doc.organization = ""; + doc.lead = doc.customer = doc.customer_name = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = ""; } @@ -185,7 +188,9 @@ cur_frm.cscript.pull_enquiry_detail = function(doc,cdt,cdn){ else if(doc.quotation_to == 'Customer') { unhide_field(['customer','customer_address','contact_person','territory','customer_group']); } - refresh_many(['quotation_details','quotation_to','customer','customer_address','contact_person','lead','lead_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','order_type']); + refresh_many(['quotation_details','quotation_to','customer','customer_address', + 'contact_person', 'lead', 'address_display', 'contact_display', 'contact_mobile', + 'contact_email', 'territory', 'customer_group', 'order_type']); } } diff --git a/selling/doctype/quotation/quotation.txt b/selling/doctype/quotation/quotation.txt index b2669e6c0f..615987bd16 100644 --- a/selling/doctype/quotation/quotation.txt +++ b/selling/doctype/quotation/quotation.txt @@ -1,8 +1,8 @@ [ { - "creation": "2013-01-10 16:34:19", + "creation": "2013-03-07 18:50:30", "docstatus": 0, - "modified": "2013-01-29 16:27:53", + "modified": "2013-04-02 16:02:45", "modified_by": "Administrator", "owner": "Administrator" }, @@ -46,6 +46,7 @@ "doctype": "DocField", "fieldname": "column_break0", "fieldtype": "Column Break", + "read_only": 0, "width": "50%" }, { @@ -59,6 +60,7 @@ "oldfieldtype": "Select", "options": "QTN", "print_hide": 1, + "read_only": 0, "reqd": 1 }, { @@ -71,6 +73,7 @@ "oldfieldtype": "Select", "options": "\nLead\nCustomer", "print_hide": 1, + "read_only": 0, "report_hide": 0, "reqd": 1 }, @@ -85,6 +88,7 @@ "oldfieldtype": "Link", "options": "Customer", "print_hide": 1, + "read_only": 0, "search_index": 1 }, { @@ -97,17 +101,8 @@ "oldfieldname": "lead", "oldfieldtype": "Link", "options": "Lead", - "print_hide": 1 - }, - { - "doctype": "DocField", - "fieldname": "lead_name", - "fieldtype": "Text", - "hidden": 1, - "in_filter": 0, - "in_list_view": 1, - "label": "Lead Name", - "read_only": 1 + "print_hide": 1, + "read_only": 0 }, { "doctype": "DocField", @@ -118,14 +113,6 @@ "label": "Customer Name", "read_only": 1 }, - { - "doctype": "DocField", - "fieldname": "organization", - "fieldtype": "Data", - "hidden": 1, - "label": "Organization", - "read_only": 1 - }, { "doctype": "DocField", "fieldname": "address_display", @@ -173,6 +160,7 @@ "fieldname": "column_break1", "fieldtype": "Column Break", "oldfieldtype": "Column Break", + "read_only": 0, "width": "50%" }, { @@ -186,6 +174,7 @@ "no_copy": 1, "oldfieldname": "transaction_date", "oldfieldtype": "Date", + "read_only": 0, "reqd": 1, "search_index": 1, "width": "100px" @@ -201,6 +190,7 @@ "oldfieldtype": "Select", "options": "\nSales\nMaintenance", "print_hide": 1, + "read_only": 0, "reqd": 1, "search_index": 0 }, @@ -211,6 +201,7 @@ "label": "Items", "oldfieldtype": "Section Break", "print_hide": 0, + "read_only": 0, "search_index": 0 }, { @@ -222,18 +213,21 @@ "oldfieldname": "quotation_details", "oldfieldtype": "Table", "options": "Quotation Item", + "read_only": 0, "width": "40px" }, { "doctype": "DocField", "fieldname": "sec_break23", "fieldtype": "Section Break", - "options": "Simple" + "options": "Simple", + "read_only": 0 }, { "doctype": "DocField", "fieldname": "col_break34", "fieldtype": "Column Break", + "read_only": 0, "width": "50%" }, { @@ -256,12 +250,14 @@ "fieldtype": "Button", "label": "Re-Calculate Values", "oldfieldtype": "Button", - "print_hide": 1 + "print_hide": 1, + "read_only": 0 }, { "doctype": "DocField", "fieldname": "col_break35", "fieldtype": "Column Break", + "read_only": 0, "width": "50%" }, { @@ -277,6 +273,7 @@ "oldfieldtype": "Link", "options": "Opportunity", "print_hide": 0, + "read_only": 0, "report_hide": 0, "search_index": 0 }, @@ -289,13 +286,15 @@ "no_copy": 0, "oldfieldtype": "Button", "print_hide": 0, + "read_only": 0, "report_hide": 0 }, { "doctype": "DocField", "fieldname": "section_break0", "fieldtype": "Section Break", - "label": "Price List and Currency" + "label": "Price List and Currency", + "read_only": 0 }, { "description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.", @@ -306,8 +305,9 @@ "label": "Price List", "oldfieldname": "price_list_name", "oldfieldtype": "Select", - "options": "link:Price List", + "options": "\n1000 sms\n10000 sms\n25000 sms\n5000 sms\nEast\nEast Price List\nEnterprise Plan\nGeneral\nPL\nSolo Plan", "print_hide": 1, + "read_only": 0, "reqd": 1, "search_index": 0, "width": "100px" @@ -320,6 +320,7 @@ "label": "Price List Currency", "options": "Currency", "print_hide": 1, + "read_only": 0, "reqd": 1 }, { @@ -329,12 +330,14 @@ "fieldtype": "Float", "label": "Price List Currency Conversion Rate", "print_hide": 1, + "read_only": 0, "reqd": 1 }, { "doctype": "DocField", "fieldname": "column_break2", "fieldtype": "Column Break", + "read_only": 0, "width": "50%" }, { @@ -348,6 +351,7 @@ "oldfieldtype": "Select", "options": "Currency", "print_hide": 1, + "read_only": 0, "reqd": 1, "search_index": 0, "width": "100px" @@ -362,6 +366,7 @@ "oldfieldname": "conversion_rate", "oldfieldtype": "Currency", "print_hide": 1, + "read_only": 0, "reqd": 1, "width": "100px" }, @@ -370,7 +375,8 @@ "fieldname": "taxes", "fieldtype": "Section Break", "label": "Taxes", - "oldfieldtype": "Section Break" + "oldfieldtype": "Section Break", + "read_only": 0 }, { "doctype": "DocField", @@ -381,7 +387,8 @@ "oldfieldname": "charge", "oldfieldtype": "Link", "options": "Sales Taxes and Charges Master", - "print_hide": 1 + "print_hide": 1, + "read_only": 0 }, { "doctype": "DocField", @@ -390,7 +397,8 @@ "hidden": 0, "label": "Get Taxes and Charges", "oldfieldtype": "Button", - "print_hide": 1 + "print_hide": 1, + "read_only": 0 }, { "doctype": "DocField", @@ -399,7 +407,8 @@ "label": "Sales Taxes and Charges", "oldfieldname": "other_charges", "oldfieldtype": "Table", - "options": "Sales Taxes and Charges" + "options": "Sales Taxes and Charges", + "read_only": 0 }, { "doctype": "DocField", @@ -407,7 +416,8 @@ "fieldtype": "Button", "label": "Calculate Taxes and Charges", "oldfieldtype": "Button", - "print_hide": 1 + "print_hide": 1, + "read_only": 0 }, { "doctype": "DocField", @@ -426,7 +436,8 @@ "fieldtype": "HTML", "label": "Taxes and Charges Calculation", "oldfieldtype": "HTML", - "print_hide": 1 + "print_hide": 1, + "read_only": 0 }, { "doctype": "DocField", @@ -434,7 +445,8 @@ "fieldtype": "Section Break", "label": "Totals", "oldfieldtype": "Section Break", - "print_hide": 1 + "print_hide": 1, + "read_only": 0 }, { "doctype": "DocField", @@ -482,6 +494,7 @@ "fieldtype": "Column Break", "oldfieldtype": "Column Break", "print_hide": 1, + "read_only": 0, "width": "50%" }, { @@ -532,7 +545,8 @@ "fieldtype": "Section Break", "label": "Terms and Conditions", "oldfieldtype": "Section Break", - "print_hide": 0 + "print_hide": 0, + "read_only": 0 }, { "doctype": "DocField", @@ -543,6 +557,7 @@ "oldfieldtype": "Link", "options": "Terms and Conditions", "print_hide": 1, + "read_only": 0, "report_hide": 1 }, { @@ -551,7 +566,8 @@ "fieldtype": "Button", "label": "Get Terms and Conditions", "oldfieldtype": "Button", - "options": "get_tc_details" + "options": "get_tc_details", + "read_only": 0 }, { "doctype": "DocField", @@ -560,7 +576,8 @@ "label": "Terms and Conditions HTML", "oldfieldtype": "HTML", "options": "You can add Terms and Notes that will be printed in the Transaction", - "print_hide": 1 + "print_hide": 1, + "read_only": 0 }, { "doctype": "DocField", @@ -568,18 +585,21 @@ "fieldtype": "Text Editor", "label": "Term Details", "oldfieldname": "terms", - "oldfieldtype": "Text Editor" + "oldfieldtype": "Text Editor", + "read_only": 0 }, { "doctype": "DocField", "fieldname": "contact_section", "fieldtype": "Section Break", - "label": "Contact Info" + "label": "Contact Info", + "read_only": 0 }, { "doctype": "DocField", "fieldname": "col_break98", "fieldtype": "Column Break", + "read_only": 0, "width": "50%" }, { @@ -590,7 +610,8 @@ "in_filter": 1, "label": "Customer Address", "options": "Address", - "print_hide": 1 + "print_hide": 1, + "read_only": 0 }, { "doctype": "DocField", @@ -603,12 +624,14 @@ "oldfieldtype": "Link", "options": "Contact", "print_hide": 1, + "read_only": 0, "reqd": 0 }, { "doctype": "DocField", "fieldname": "col_break99", "fieldtype": "Column Break", + "read_only": 0, "width": "50%" }, { @@ -621,6 +644,7 @@ "label": "Territory", "options": "Territory", "print_hide": 1, + "read_only": 0, "reqd": 1, "search_index": 0 }, @@ -634,6 +658,7 @@ "oldfieldtype": "Link", "options": "Customer Group", "print_hide": 1, + "read_only": 0, "reqd": 0, "search_index": 0 }, @@ -644,7 +669,8 @@ "fieldtype": "Section Break", "label": "More Info", "oldfieldtype": "Section Break", - "print_hide": 1 + "print_hide": 1, + "read_only": 0 }, { "allow_on_submit": 1, @@ -654,8 +680,9 @@ "label": "Letter Head", "oldfieldname": "letter_head", "oldfieldtype": "Select", - "options": "link:Letter Head", - "print_hide": 1 + "options": "\nDefault\nERP Grey Large\nERP LOGO\nERPNext Logo Black\nERPNext WT Logo", + "print_hide": 1, + "read_only": 0 }, { "description": "Select the relevant company name if you have multiple companies.", @@ -668,6 +695,7 @@ "oldfieldtype": "Link", "options": "Company", "print_hide": 1, + "read_only": 0, "reqd": 1, "search_index": 0, "width": "150px" @@ -683,6 +711,7 @@ "oldfieldtype": "Select", "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", "print_hide": 1, + "read_only": 0, "report_hide": 0 }, { @@ -693,8 +722,9 @@ "label": "Fiscal Year", "oldfieldname": "fiscal_year", "oldfieldtype": "Select", - "options": "link:Fiscal Year", + "options": "\n2008-2009\n2009-2010\n2010-2011\n2011-2012\n2012-2013\n2013-2014", "print_hide": 1, + "read_only": 0, "reqd": 1, "search_index": 0 }, @@ -717,6 +747,7 @@ "fieldtype": "Column Break", "oldfieldtype": "Column Break", "print_hide": 1, + "read_only": 0, "width": "50%" }, { @@ -747,6 +778,7 @@ "oldfieldtype": "Link", "options": "Campaign", "print_hide": 1, + "read_only": 0, "report_hide": 0 }, { @@ -758,7 +790,8 @@ "no_copy": 1, "oldfieldname": "order_lost_reason", "oldfieldtype": "Small Text", - "print_hide": 1 + "print_hide": 1, + "read_only": 0 }, { "allow_on_submit": 1, @@ -771,6 +804,7 @@ "oldfieldtype": "Link", "options": "Print Heading", "print_hide": 1, + "read_only": 0, "report_hide": 1 }, { @@ -795,6 +829,7 @@ "oldfieldname": "amendment_date", "oldfieldtype": "Date", "print_hide": 1, + "read_only": 0, "width": "100px" }, { @@ -804,7 +839,8 @@ "fieldtype": "Section Break", "label": "Communication History", "oldfieldtype": "Section Break", - "print_hide": 1 + "print_hide": 1, + "read_only": 0 }, { "allow_on_submit": 1, @@ -815,6 +851,7 @@ "oldfieldname": "follow_up", "oldfieldtype": "Table", "print_hide": 1, + "read_only": 0, "width": "40px" }, { @@ -824,16 +861,8 @@ "hidden": 1, "label": "File List", "no_copy": 1, - "print_hide": 1 - }, - { - "amend": 1, - "cancel": 1, - "create": 1, - "doctype": "DocPerm", - "role": "Sales Manager", - "submit": 1, - "write": 1 + "print_hide": 1, + "read_only": 0 }, { "amend": 1, @@ -845,13 +874,18 @@ "write": 1 }, { - "amend": 0, - "cancel": 0, - "create": 0, "doctype": "DocPerm", - "role": "Customer", - "submit": 0, - "write": 0 + "match": "customer_name", + "role": "Customer" + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "doctype": "DocPerm", + "role": "Sales Manager", + "submit": 1, + "write": 1 }, { "amend": 1, diff --git a/utilities/transaction_base.py b/utilities/transaction_base.py index c43a456687..4b34ba1286 100644 --- a/utilities/transaction_base.py +++ b/utilities/transaction_base.py @@ -161,12 +161,12 @@ class TransactionBase(DocListController): if address_display.startswith('\n'): address_display = address_display[1:] ret = { - 'lead_name' : extract('lead_name'), + 'contact_display' : extract('lead_name'), 'address_display' : address_display, 'territory' : extract('territory'), 'contact_mobile' : extract('mobile_no'), 'contact_email' : extract('email_id'), - 'organization' : extract('company_name') + 'customer_name' : extract('company_name') or extract('lead_name') } return ret From 8f97d2dab012a72e9bd82648f0e300fa206972fa Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 2 Apr 2013 18:14:31 +0530 Subject: [PATCH 4/8] [quotation][improvement] when made from lead --- selling/Print Format/Quotation Classic/Quotation Classic.txt | 4 ++-- selling/Print Format/Quotation Modern/Quotation Modern.txt | 4 ++-- selling/Print Format/Quotation Spartan/Quotation Spartan.txt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/selling/Print Format/Quotation Classic/Quotation Classic.txt b/selling/Print Format/Quotation Classic/Quotation Classic.txt index 0cb2caac35..03a056b18c 100644 --- a/selling/Print Format/Quotation Classic/Quotation Classic.txt +++ b/selling/Print Format/Quotation Classic/Quotation Classic.txt @@ -1,8 +1,8 @@ [ { - "creation": "2013-02-19 16:00:26", + "creation": "2012-04-17 11:29:12", "docstatus": 0, - "modified": "2013-04-02 17:52:30", + "modified": "2013-04-02 18:14:21", "modified_by": "Administrator", "owner": "Administrator" }, diff --git a/selling/Print Format/Quotation Modern/Quotation Modern.txt b/selling/Print Format/Quotation Modern/Quotation Modern.txt index 0b22fdbaa1..b7a29bf4c5 100644 --- a/selling/Print Format/Quotation Modern/Quotation Modern.txt +++ b/selling/Print Format/Quotation Modern/Quotation Modern.txt @@ -1,8 +1,8 @@ [ { - "creation": "2013-02-19 16:22:50", + "creation": "2012-04-17 11:29:12", "docstatus": 0, - "modified": "2013-04-02 17:53:14", + "modified": "2013-04-02 18:14:05", "modified_by": "Administrator", "owner": "Administrator" }, diff --git a/selling/Print Format/Quotation Spartan/Quotation Spartan.txt b/selling/Print Format/Quotation Spartan/Quotation Spartan.txt index 740370e7b1..3fbf6291c3 100644 --- a/selling/Print Format/Quotation Spartan/Quotation Spartan.txt +++ b/selling/Print Format/Quotation Spartan/Quotation Spartan.txt @@ -1,8 +1,8 @@ [ { - "creation": "2013-02-19 16:22:50", + "creation": "2012-04-17 11:29:12", "docstatus": 0, - "modified": "2013-04-02 17:51:46", + "modified": "2013-04-02 18:13:47", "modified_by": "Administrator", "owner": "Administrator" }, From 596ff91b3a8d250fb6987f4d562235ddeeda3e8b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 2 Apr 2013 18:24:06 +0530 Subject: [PATCH 5/8] [quotation][improvement] when made from lead --- patches/april_2013/p03_fixes_for_lead_in_quotation.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/patches/april_2013/p03_fixes_for_lead_in_quotation.py b/patches/april_2013/p03_fixes_for_lead_in_quotation.py index 21a57faeb9..1b9650b166 100644 --- a/patches/april_2013/p03_fixes_for_lead_in_quotation.py +++ b/patches/april_2013/p03_fixes_for_lead_in_quotation.py @@ -12,4 +12,7 @@ def execute(): where quotation_to = 'Lead' and ifnull(lead, '') != '' and ifnull(lead_name, '') != ''""") webnotes.conn.sql("""update `tabOpportunity` set contact_display = lead_name - where enquiry_from = 'Lead' and ifnull(lead, '') != '' and ifnull(lead_name, '') != ''""") \ No newline at end of file + where enquiry_from = 'Lead' and ifnull(lead, '') != '' and ifnull(lead_name, '') != ''""") + + webnotes.conn.sql("""update `tabOpportunity` opp, `tabLead` lead + set opp.customer_name = lead.company_name where opp.lead = lead.name""") \ No newline at end of file From ad16279efd42ad7b25e7c78bafdf1423d6e4cb7a Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 3 Apr 2013 09:53:24 +0530 Subject: [PATCH 6/8] [quotation] [fix ] broken links --- selling/doctype/quotation/quotation.txt | 94 ++++++++++++++++++++----- 1 file changed, 75 insertions(+), 19 deletions(-) diff --git a/selling/doctype/quotation/quotation.txt b/selling/doctype/quotation/quotation.txt index 615987bd16..23e767c328 100644 --- a/selling/doctype/quotation/quotation.txt +++ b/selling/doctype/quotation/quotation.txt @@ -1,8 +1,8 @@ [ { - "creation": "2013-03-07 18:50:30", + "creation": "2013-04-03 09:50:56", "docstatus": 0, - "modified": "2013-04-02 16:02:45", + "modified": "2013-04-03 09:53:04", "modified_by": "Administrator", "owner": "Administrator" }, @@ -34,9 +34,7 @@ "parent": "Quotation", "parentfield": "permissions", "parenttype": "DocType", - "permlevel": 0, - "read": 1, - "report": 1 + "read": 1 }, { "doctype": "DocType", @@ -305,7 +303,7 @@ "label": "Price List", "oldfieldname": "price_list_name", "oldfieldtype": "Select", - "options": "\n1000 sms\n10000 sms\n25000 sms\n5000 sms\nEast\nEast Price List\nEnterprise Plan\nGeneral\nPL\nSolo Plan", + "options": "link:Price List", "print_hide": 1, "read_only": 0, "reqd": 1, @@ -722,7 +720,7 @@ "label": "Fiscal Year", "oldfieldname": "fiscal_year", "oldfieldtype": "Select", - "options": "\n2008-2009\n2009-2010\n2010-2011\n2011-2012\n2012-2013\n2013-2014", + "options": "link:Fiscal Year", "print_hide": 1, "read_only": 0, "reqd": 1, @@ -865,24 +863,23 @@ "read_only": 0 }, { - "amend": 1, - "cancel": 1, - "create": 1, + "amend": 0, + "cancel": 0, + "create": 0, "doctype": "DocPerm", - "role": "Sales User", - "submit": 1, - "write": 1 - }, - { - "doctype": "DocPerm", - "match": "customer_name", - "role": "Customer" + "permlevel": 1, + "report": 0, + "role": "Sales Manager", + "submit": 0, + "write": 0 }, { "amend": 1, "cancel": 1, "create": 1, "doctype": "DocPerm", + "permlevel": 0, + "report": 1, "role": "Sales Manager", "submit": 1, "write": 1 @@ -892,17 +889,76 @@ "cancel": 1, "create": 1, "doctype": "DocPerm", - "role": "Maintenance Manager", + "permlevel": 0, + "report": 1, + "role": "Sales User", "submit": 1, "write": 1 }, + { + "amend": 0, + "cancel": 0, + "create": 0, + "doctype": "DocPerm", + "permlevel": 1, + "report": 0, + "role": "Sales User", + "submit": 0, + "write": 0 + }, + { + "amend": 0, + "cancel": 0, + "create": 0, + "doctype": "DocPerm", + "permlevel": 0, + "report": 1, + "role": "Customer", + "submit": 0, + "write": 0 + }, { "amend": 1, "cancel": 1, "create": 1, "doctype": "DocPerm", + "permlevel": 0, + "report": 1, + "role": "Maintenance Manager", + "submit": 1, + "write": 1 + }, + { + "amend": 0, + "cancel": 0, + "create": 0, + "doctype": "DocPerm", + "permlevel": 1, + "report": 0, + "role": "Maintenance Manager", + "submit": 0, + "write": 0 + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "doctype": "DocPerm", + "permlevel": 0, + "report": 1, "role": "Maintenance User", "submit": 1, "write": 1 + }, + { + "amend": 0, + "cancel": 0, + "create": 0, + "doctype": "DocPerm", + "permlevel": 1, + "report": 0, + "role": "Maintenance User", + "submit": 0, + "write": 0 } ] \ No newline at end of file From c0ad4a22290cfda7d93b1bf5e4967034816af51e Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 3 Apr 2013 09:58:04 +0530 Subject: [PATCH 7/8] [patch] [fix] added reload print format --- patches/patch_list.py | 1 + 1 file changed, 1 insertion(+) diff --git a/patches/patch_list.py b/patches/patch_list.py index b0fc97a269..ea4f718810 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -230,6 +230,7 @@ patch_list = [ "patches.april_2013.p01_update_serial_no_valuation_rate", "patches.april_2013.p02_add_country_and_currency", "patches.april_2013.p03_fixes_for_lead_in_quotation", + "execute:webnotes.reload_doc('core', 'doctype', 'print_format')", 'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Classic") # 2013-04-02', 'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Modern") # 2013-04-02', 'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Spartan") # 2013-04-02', From c5ddb85d39df5fbf934d4b42d9b20be3c2699aef Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 3 Apr 2013 10:06:54 +0530 Subject: [PATCH 8/8] [patch] [fix] added reload print format --- patches/patch_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/patch_list.py b/patches/patch_list.py index ea4f718810..28d735c43d 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -158,6 +158,7 @@ patch_list = [ "patches.january_2013.enable_currencies", "patches.january_2013.remove_unwanted_permission", "patches.january_2013.remove_landed_cost_master", + "execute:webnotes.reload_doc('core', 'doctype', 'print_format')", "patches.january_2013.reload_print_format", "patches.january_2013.rebuild_tree", "execute:webnotes.reload_doc('core','doctype','docfield') #2013-01-28", @@ -230,7 +231,6 @@ patch_list = [ "patches.april_2013.p01_update_serial_no_valuation_rate", "patches.april_2013.p02_add_country_and_currency", "patches.april_2013.p03_fixes_for_lead_in_quotation", - "execute:webnotes.reload_doc('core', 'doctype', 'print_format')", 'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Classic") # 2013-04-02', 'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Modern") # 2013-04-02', 'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Spartan") # 2013-04-02',