From dc8913e13218540791215049a39264d051baf845 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 9 Jan 2013 12:35:24 +0530 Subject: [PATCH 01/10] toggle display of contact info based on customer and conatct, address query based on customer --- .../doctype/sales_invoice/sales_invoice.js | 29 +++------------ selling/doctype/opportunity/opportunity.js | 22 +++++++++--- selling/doctype/quotation/quotation.js | 24 ++----------- selling/doctype/sales_common/sales_common.js | 20 +++++++++++ selling/doctype/sales_order/sales_order.js | 31 ++++------------ stock/doctype/delivery_note/delivery_note.js | 35 +++++++------------ 6 files changed, 65 insertions(+), 96 deletions(-) diff --git a/accounts/doctype/sales_invoice/sales_invoice.js b/accounts/doctype/sales_invoice/sales_invoice.js index 86dc3a5c14..eab1d4744d 100644 --- a/accounts/doctype/sales_invoice/sales_invoice.js +++ b/accounts/doctype/sales_invoice/sales_invoice.js @@ -94,8 +94,7 @@ cur_frm.cscript.hide_fields = function(doc, cdt, cdn) { for(f in item_flds_pos) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_pos[f], false); } - if(doc.customer) unhide_field('contact_section'); - else hide_field('contact_section'); + cur_frm.toggle_display("contact_section", doc.customer); // India related fields var cp = wn.control_panel; @@ -173,6 +172,8 @@ cur_frm.cscript.warehouse = function(doc, cdt , cdn) { //Customer cur_frm.cscript.customer = function(doc,dt,dn,onload) { + cur_frm.toggle_display("contact_section", doc.customer); + var pl = doc.price_list_name; var callback = function(r,rt) { var callback2 = function(doc, dt, dn) { @@ -191,8 +192,6 @@ cur_frm.cscript.customer = function(doc,dt,dn,onload) { } var args = onload ? 'onload':'' if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', args, callback); - - if(doc.customer) unhide_field('contact_section'); } @@ -202,25 +201,6 @@ cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc if(doc.customer) get_server_fields('get_customer_address', JSON.stringify({customer: doc.customer, address: doc.customer_address, contact: doc.contact_person}),'', doc, dt, dn, 1); } -cur_frm.fields_dict.customer_address.on_new = function(dn) { - locals['Address'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer; - locals['Address'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name; -} - -cur_frm.fields_dict.contact_person.on_new = function(dn) { - locals['Contact'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer; - locals['Contact'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name; -} - -cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) { - return 'SELECT name,address_line1,city FROM tabAddress WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50'; -} - -cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) { - return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation FROM tabContact WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50'; -} - - // Set Due Date = posting date + credit days cur_frm.cscript.debit_to = function(doc,dt,dn) { @@ -232,7 +212,8 @@ cur_frm.cscript.debit_to = function(doc,dt,dn) { var callback = function(r,rt) { var doc = locals[cur_frm.doctype][cur_frm.docname]; if(doc.customer) $c_obj(make_doclist(dt,dn), 'get_default_customer_address', '', callback2); - if(doc.customer) unhide_field('contact_section'); + cur_frm.toggle_display("contact_section", doc.customer); + cur_frm.refresh(); } diff --git a/selling/doctype/opportunity/opportunity.js b/selling/doctype/opportunity/opportunity.js index d5c665a70c..664b88d8cf 100644 --- a/selling/doctype/opportunity/opportunity.js +++ b/selling/doctype/opportunity/opportunity.js @@ -25,6 +25,9 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn){ cur_frm.add_custom_button('Opportunity Lost', cur_frm.cscript['Declare Opportunity Lost']); cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms); } + + cur_frm.toggle_display("contact_info", doc.customer || doc.lead); + } // ONLOAD @@ -79,7 +82,7 @@ cur_frm.cscript.enquiry_from = function(doc,cdt,cdn){ } // hide - unhide fields based on lead or customer -cur_frm.cscript.lead_cust_show = 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']); @@ -87,13 +90,15 @@ cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){ } else if(doc.enquiry_from == 'Customer'){ unhide_field(['customer']); - hide_field(['lead','lead_name','address_display','contact_display','contact_mobile','contact_email','territory']); + 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 = ""; } } // customer cur_frm.cscript.customer = function(doc,dt,dn) { + cur_frm.toggle_display("contact_info", doc.customer || doc.lead); + if(doc.customer) { cur_frm.call({ doc: cur_frm.doc, @@ -127,11 +132,18 @@ cur_frm.fields_dict.contact_person.on_new = function(dn) { } cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) { - return 'SELECT name,address_line1,city FROM tabAddress WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50'; + return 'SELECT name, address_line1, city FROM tabAddress \ + WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND \ + %(key)s LIKE "%s" ORDER BY name ASC LIMIT 50'; } cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) { - return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation FROM tabContact WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50'; + if (!doc.customer) msgprint("Please select customer first"); + else { + return 'SELECT name, CONCAT(first_name," ",ifnull(last_name,"")) As FullName, \ + department, designation FROM tabContact WHERE customer = "'+ doc.customer + + '" AND docstatus != 2 AND %(key)s LIKE "%s" ORDER BY name ASC LIMIT 50'; + } } // lead @@ -140,6 +152,8 @@ 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']); } diff --git a/selling/doctype/quotation/quotation.js b/selling/doctype/quotation/quotation.js index 3673b07d9a..532cecc866 100644 --- a/selling/doctype/quotation/quotation.js +++ b/selling/doctype/quotation/quotation.js @@ -94,8 +94,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { erpnext.hide_naming_series(); - if(doc.customer || doc.lead) $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(true); - else $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(false); + cur_frm.toggle_display("contact_section", doc.customer || doc.lead); if (!doc.__islocal) { cur_frm.communication_view = new wn.views.CommunicationList({ @@ -119,7 +118,8 @@ cur_frm.cscript.customer = function(doc,dt,dn) { if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', '', callback); - if(doc.customer) unhide_field(['customer_address','contact_person','territory', 'customer_group']); + + cur_frm.toggle_display("contact_section", doc.customer); } cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) { @@ -130,24 +130,6 @@ cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc }),'', doc, dt, dn, 1); } -cur_frm.fields_dict.customer_address.on_new = function(dn) { - locals['Address'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer; - locals['Address'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name; -} - -cur_frm.fields_dict.contact_person.on_new = function(dn) { - locals['Contact'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer; - locals['Contact'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name; -} - -cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) { - return 'SELECT name,address_line1,city FROM tabAddress WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50'; -} - -cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) { - return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation FROM tabContact WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50'; -} - cur_frm.fields_dict.lead.get_query = erpnext.utils.lead_query; cur_frm.cscript.lead = function(doc, cdt, cdn) { diff --git a/selling/doctype/sales_common/sales_common.js b/selling/doctype/sales_common/sales_common.js index c1435bd3b3..4ceac9e41d 100644 --- a/selling/doctype/sales_common/sales_common.js +++ b/selling/doctype/sales_common/sales_common.js @@ -320,7 +320,27 @@ cur_frm.fields_dict[cur_frm.cscript.fname].grid.get_field('batch_no').get_query } } +cur_frm.fields_dict.customer_address.on_new = function(dn) { + locals['Address'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer; + locals['Address'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name; +} +cur_frm.fields_dict.contact_person.on_new = function(dn) { + locals['Contact'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer; + locals['Contact'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name; +} + +cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) { + return 'SELECT name, address_line1, city FROM tabAddress \ + WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND \ + %(key)s LIKE "%s" ORDER BY name ASC LIMIT 50'; +} + +cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) { + return 'SELECT name, CONCAT(first_name," ",ifnull(last_name,"")) As FullName, \ + department, designation FROM tabContact WHERE customer = "'+ doc.customer + + '" AND docstatus != 2 AND %(key)s LIKE "%s" ORDER BY name ASC LIMIT 50'; +} // *********************** QUANTITY *************************** cur_frm.cscript.qty = function(doc, cdt, cdn) { cur_frm.cscript.recalc(doc, 1); } diff --git a/selling/doctype/sales_order/sales_order.js b/selling/doctype/sales_order/sales_order.js index a3b71b4cbb..f8d9fde41d 100644 --- a/selling/doctype/sales_order/sales_order.js +++ b/selling/doctype/sales_order/sales_order.js @@ -36,7 +36,9 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { // load default charges if(doc.__islocal && !doc.customer){ - hide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']); + hide_field(['customer_address', 'contact_person', 'customer_name', + 'address_display', 'contact_display', 'contact_mobile', + 'contact_email', 'territory', 'customer_group']); } } @@ -59,9 +61,8 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { if (!cur_frm.cscript.is_onload) cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn); - if(doc.customer) $(cur_frm.fields_dict.contact_info.row.wrapper).toggle(true); - else $(cur_frm.fields_dict.contact_info.row.wrapper).toggle(false); - + cur_frm.toggle_display("contact_info", doc.customer); + if(doc.docstatus==1) { if(doc.status != 'Stopped') { cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms); @@ -105,11 +106,11 @@ cur_frm.cscript.order_type = function(doc) { //customer cur_frm.cscript.customer = function(doc,dt,dn) { + cur_frm.toggle_display("contact_info", doc.customer); + var pl = doc.price_list_name; var callback = function(r,rt) { var callback2 = function(r, rt) { - - if(doc.customer) unhide_field(['customer_address', 'contact_person', 'territory','customer_group']); cur_frm.refresh(); if(!onload && (pl != doc.price_list_name)) cur_frm.cscript.price_list_name(doc, dt, dn); @@ -126,24 +127,6 @@ cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc if(doc.customer) get_server_fields('get_customer_address', JSON.stringify({customer: doc.customer, address: doc.customer_address, contact: doc.contact_person}),'', doc, dt, dn, 1); } -cur_frm.fields_dict.customer_address.on_new = function(dn) { - locals['Address'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer; - locals['Address'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name; -} - -cur_frm.fields_dict.contact_person.on_new = function(dn) { - locals['Contact'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer; - locals['Contact'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name; -} - -cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) { - return 'SELECT name,address_line1,city FROM tabAddress WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50'; -} - -cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) { - return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation FROM tabContact WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50'; -} - cur_frm.cscript.pull_quotation_details = function(doc,dt,dn) { var callback = function(r,rt){ var doc = locals[cur_frm.doctype][cur_frm.docname]; diff --git a/stock/doctype/delivery_note/delivery_note.js b/stock/doctype/delivery_note/delivery_note.js index a80966aaa4..21e6dc0514 100644 --- a/stock/doctype/delivery_note/delivery_note.js +++ b/stock/doctype/delivery_note/delivery_note.js @@ -69,8 +69,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.add_custom_button('Make Packing Slip', cur_frm.cscript['Make Packing Slip']); } - if(doc.customer) $(cur_frm.fields_dict.contact_info.row.wrapper).toggle(true); - else $(cur_frm.fields_dict.contact_info.row.wrapper).toggle(false); + cur_frm.toggle_display("contact_info", doc.customer); set_print_hide(doc, cdt, cdn); } @@ -78,38 +77,25 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { //customer cur_frm.cscript.customer = function(doc,dt,dn,onload) { + cur_frm.toggle_display("contact_info", doc.customer); + var pl = doc.price_list_name; var callback = function(r,rt) { var doc = locals[cur_frm.doctype][cur_frm.docname]; - if(doc.customer) unhide_field(['customer_address','contact_person','territory','customer_group']); + if(doc.customer) + unhide_field(['customer_address','contact_person','territory','customer_group']); cur_frm.refresh(); if(!onload && (pl != doc.price_list_name)) cur_frm.cscript.price_list_name(doc, dt, dn); } var args = onload ? 'onload':'' - if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_shipping_address', args, callback); + if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), + 'get_default_customer_shipping_address', args, callback); } cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) { if(doc.customer) get_server_fields('get_customer_address', JSON.stringify({customer: doc.customer, address: doc.customer_address, contact: doc.contact_person}),'', doc, dt, dn, 1); } -cur_frm.fields_dict.customer_address.on_new = function(dn) { - locals['Address'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer; - locals['Address'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name; -} - -cur_frm.fields_dict.contact_person.on_new = function(dn) { - locals['Contact'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer; - locals['Contact'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name; -} - -cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) { - return 'SELECT name,address_line1,city FROM tabAddress WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50'; -} - -cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) { - return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation FROM tabContact WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50'; -} cur_frm.cscript.get_items = function(doc,dt,dn) { var callback = function(r,rt){ @@ -117,9 +103,12 @@ cur_frm.cscript.get_items = function(doc,dt,dn) { if(r.message){ doc.sales_order_no = r.message; if(doc.sales_order_no) { - unhide_field(['customer_address','contact_person','territory','customer_group']); + unhide_field(['customer_address','contact_person','territory','customer_group']); } - refresh_many(['delivery_note_details','customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']); + + refresh_many(['delivery_note_details', 'customer', 'customer_address', + 'contact_person', 'customer_name', 'address_display', 'contact_display', + 'contact_mobile', 'contact_email', 'territory', 'customer_group']); } } $c_obj(make_doclist(doc.doctype, doc.name),'pull_sales_order_details','',callback); From 0f61b476a27b42ac71956c419642f2b909c854a0 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 9 Jan 2013 12:50:43 +0530 Subject: [PATCH 02/10] toggle display of contact info based on customer --- selling/doctype/quotation/quotation.js | 8 +++++--- selling/doctype/sales_order/sales_order.js | 14 +++++++++----- stock/doctype/delivery_note/delivery_note.js | 4 +++- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/selling/doctype/quotation/quotation.js b/selling/doctype/quotation/quotation.js index 532cecc866..330e4e7e16 100644 --- a/selling/doctype/quotation/quotation.js +++ b/selling/doctype/quotation/quotation.js @@ -93,7 +93,6 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { } erpnext.hide_naming_series(); - cur_frm.toggle_display("contact_section", doc.customer || doc.lead); if (!doc.__islocal) { @@ -118,8 +117,9 @@ cur_frm.cscript.customer = function(doc,dt,dn) { if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', '', callback); - - cur_frm.toggle_display("contact_section", doc.customer); + if(doc.customer) unhide_field(['customer_address','contact_person','territory', 'customer_group']); + cur_frm.toggle_display("contact_section", doc.customer || doc.lead); + } cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) { @@ -133,6 +133,8 @@ cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc cur_frm.fields_dict.lead.get_query = erpnext.utils.lead_query; cur_frm.cscript.lead = function(doc, cdt, cdn) { + cur_frm.toggle_display("contact_section", doc.customer || doc.lead); + if(doc.lead) { get_server_fields('get_lead_details', doc.lead,'', doc, cdt, cdn, 1); unhide_field('territory'); diff --git a/selling/doctype/sales_order/sales_order.js b/selling/doctype/sales_order/sales_order.js index f8d9fde41d..607b132b9b 100644 --- a/selling/doctype/sales_order/sales_order.js +++ b/selling/doctype/sales_order/sales_order.js @@ -36,9 +36,9 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { // load default charges if(doc.__islocal && !doc.customer){ - hide_field(['customer_address', 'contact_person', 'customer_name', - 'address_display', 'contact_display', 'contact_mobile', - 'contact_email', 'territory', 'customer_group']); + hide_field(['customer_address','contact_person', 'customer_name', + 'address_display', 'contact_display', 'contact_mobile', + 'contact_email', 'territory', 'customer_group']); } } @@ -111,6 +111,8 @@ cur_frm.cscript.customer = function(doc,dt,dn) { var pl = doc.price_list_name; var callback = function(r,rt) { var callback2 = function(r, rt) { + if(doc.customer) + unhide_field(['customer_address', 'contact_person', 'territory','customer_group']); cur_frm.refresh(); if(!onload && (pl != doc.price_list_name)) cur_frm.cscript.price_list_name(doc, dt, dn); @@ -120,7 +122,8 @@ cur_frm.cscript.customer = function(doc,dt,dn) { get_server_fields('get_shipping_address',doc.customer,'',doc, dt, dn, 0, callback2); } - if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', '', callback); + if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), + 'get_default_customer_address', '', callback); } cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) { @@ -133,7 +136,8 @@ cur_frm.cscript.pull_quotation_details = function(doc,dt,dn) { if(!r.exc){ doc.quotation_no = r.message; if(doc.quotation_no) { - unhide_field(['quotation_date', 'customer_address', 'contact_person', 'territory', 'customer_group']); + unhide_field(['quotation_date', 'customer_address', + 'contact_person', 'territory', 'customer_group']); if(doc.customer) get_server_fields('get_shipping_address', doc.customer, '', doc, dt, dn, 0); } cur_frm.refresh(); diff --git a/stock/doctype/delivery_note/delivery_note.js b/stock/doctype/delivery_note/delivery_note.js index 21e6dc0514..223b06460c 100644 --- a/stock/doctype/delivery_note/delivery_note.js +++ b/stock/doctype/delivery_note/delivery_note.js @@ -37,7 +37,9 @@ cur_frm.cscript.onload = function(doc, dt, dn) { if(!doc.posting_time) doc.posting_time = wn.datetime.get_cur_time() if(doc.__islocal){ - hide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']); + hide_field(['customer_address', 'contact_person', 'customer_name', + 'address_display', 'contact_display', 'contact_mobile', + 'contact_email', 'territory', 'customer_group']); } } From f8c6531c3d8cbb4470da2cd2992573bb78996d0f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 9 Jan 2013 14:44:24 +0530 Subject: [PATCH 03/10] set as default button in fiscal year --- accounts/doctype/fiscal_year/fiscal_year.js | 28 ++++ accounts/doctype/fiscal_year/fiscal_year.py | 13 +- .../global_defaults/global_defaults.py | 3 + stock/doctype/delivery_note/delivery_note.txt | 127 ++++++++---------- 4 files changed, 102 insertions(+), 69 deletions(-) diff --git a/accounts/doctype/fiscal_year/fiscal_year.js b/accounts/doctype/fiscal_year/fiscal_year.js index 936037cd6c..6e0ed38c39 100644 --- a/accounts/doctype/fiscal_year/fiscal_year.js +++ b/accounts/doctype/fiscal_year/fiscal_year.js @@ -1,3 +1,31 @@ +// ERPNext - web based ERP (http://erpnext.com) +// Copyright (C) 2012 Web Notes Technologies Pvt Ltd +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + cur_frm.cscript.refresh = function(doc, dt, dn) { cur_frm.toggle_enable('year_start_date', doc.__islocal) + + if (!doc.__islocal && (doc.name != sys_defaults.fiscal_year)) { + cur_frm.add_custom_button("Set as Default", cur_frm.cscript.set_as_default); + cur_frm.set_intro("To set this Fiscal Year as Deafult, click on 'Set as Default'"); + } else cur_frm.set_intro(""); } + +cur_frm.cscript.set_as_default = function() { + wn.call({ + doc: cur_frm.doc, + method: "set_as_default" + }); +} \ No newline at end of file diff --git a/accounts/doctype/fiscal_year/fiscal_year.py b/accounts/doctype/fiscal_year/fiscal_year.py index 7f48feb2eb..e23351c3ac 100644 --- a/accounts/doctype/fiscal_year/fiscal_year.py +++ b/accounts/doctype/fiscal_year/fiscal_year.py @@ -16,7 +16,18 @@ from __future__ import unicode_literals import webnotes +from webnotes import msgprint, _ class DocType: def __init__(self, d, dl): - self.doc, self.doclist = d, dl \ No newline at end of file + self.doc, self.doclist = d, dl + + def set_as_default(self): + webnotes.conn.set_value("Global Defaults", None, "current_fiscal_year", self.doc.name) + webnotes.get_obj("Global Defaults").on_update() + + # clear cache + webnotes.clear_cache() + + msgprint(self.doc.name + _(""" is now the default Fiscal Year. \ + Please refresh your browser for the change to take effect.""")) \ No newline at end of file diff --git a/setup/doctype/global_defaults/global_defaults.py b/setup/doctype/global_defaults/global_defaults.py index 48c2365b06..1d93e241d6 100644 --- a/setup/doctype/global_defaults/global_defaults.py +++ b/setup/doctype/global_defaults/global_defaults.py @@ -64,6 +64,9 @@ class DocType: webnotes.conn.set_default('year_start_date', ysd.strftime('%Y-%m-%d')) webnotes.conn.set_default('year_end_date', \ get_last_day(get_first_day(ysd,0,11)).strftime('%Y-%m-%d')) + + # clear cache + webnotes.clear_cache() def validate_session_expiry(self): if self.doc.session_expiry: diff --git a/stock/doctype/delivery_note/delivery_note.txt b/stock/doctype/delivery_note/delivery_note.txt index d3e16423ef..215dd41b62 100644 --- a/stock/doctype/delivery_note/delivery_note.txt +++ b/stock/doctype/delivery_note/delivery_note.txt @@ -2,9 +2,9 @@ { "owner": "Administrator", "docstatus": 0, - "creation": "2012-11-28 11:26:21", + "creation": "2012-12-03 17:26:43", "modified_by": "Administrator", - "modified": "2012-12-03 17:10:41" + "modified": "2013-01-09 12:52:30" }, { "is_submittable": 1, @@ -19,6 +19,7 @@ "doctype": "DocType" }, { + "read_only": 0, "name": "__common__", "parent": "Delivery Note", "doctype": "DocField", @@ -38,10 +39,10 @@ "doctype": "DocType" }, { + "print_width": "50%", "oldfieldtype": "Column Break", "doctype": "DocField", "width": "50%", - "trigger": "Client", "fieldname": "column_break0", "fieldtype": "Column Break", "permlevel": 0 @@ -51,7 +52,6 @@ "description": "To manage multiple series please go to Setup > Manage Series", "no_copy": 1, "oldfieldtype": "Select", - "colour": "White:FFF", "doctype": "DocField", "label": "Series", "oldfieldname": "naming_series", @@ -68,7 +68,6 @@ "label": "Customer", "oldfieldname": "customer", "permlevel": 0, - "trigger": "Client", "fieldname": "customer", "fieldtype": "Link", "search_index": 1, @@ -86,6 +85,7 @@ }, { "print_hide": 1, + "depends_on": "customer", "doctype": "DocField", "label": "Select Shipping Address", "options": "Address", @@ -136,11 +136,11 @@ }, { "print_hide": 0, + "permlevel": 0, "description": "The date at which current entry will get or has actually executed.", - "width": "100px", + "print_width": "100px", "default": "Today", "oldfieldtype": "Date", - "colour": "White:FFF", "doctype": "DocField", "label": "Posting Date", "oldfieldname": "posting_date", @@ -150,7 +150,7 @@ "search_index": 1, "reqd": 1, "in_filter": 1, - "permlevel": 0 + "width": "100px" }, { "print_hide": 1, @@ -176,6 +176,7 @@ }, { "print_hide": 1, + "print_width": "100px", "no_copy": 0, "oldfieldtype": "Data", "doctype": "DocField", @@ -189,9 +190,9 @@ }, { "print_hide": 1, + "print_width": "100px", "no_copy": 0, "oldfieldtype": "Data", - "colour": "White:FFF", "doctype": "DocField", "label": "P.O. Date", "oldfieldname": "po_date", @@ -204,7 +205,6 @@ }, { "oldfieldtype": "Section Break", - "colour": "White:FFF", "doctype": "DocField", "label": "Items", "fieldname": "items", @@ -215,7 +215,6 @@ "print_hide": 0, "no_copy": 0, "oldfieldtype": "Table", - "colour": "White:FFF", "allow_on_submit": 1, "doctype": "DocField", "label": "Delivery Note Items", @@ -248,6 +247,7 @@ }, { "print_hide": 0, + "print_width": "150px", "no_copy": 0, "oldfieldtype": "Currency", "doctype": "DocField", @@ -263,7 +263,6 @@ "oldfieldtype": "Button", "doctype": "DocField", "label": "Re-Calculate Values", - "trigger": "Client", "fieldname": "recalculate_values", "fieldtype": "Button", "permlevel": 0 @@ -279,7 +278,6 @@ "description": "You can make a delivery note from multiple sales orders. Select sales orders one by one and click on the button below.", "no_copy": 0, "oldfieldtype": "Link", - "colour": "White:FFF", "doctype": "DocField", "label": "Sales Order No", "oldfieldname": "sales_order_no", @@ -316,12 +314,10 @@ "print_hide": 1, "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.", "oldfieldtype": "Select", - "colour": "White:FFF", "doctype": "DocField", "label": "Price List", "oldfieldname": "price_list_name", "permlevel": 0, - "trigger": "Client", "fieldname": "price_list_name", "fieldtype": "Select", "reqd": 1, @@ -330,7 +326,6 @@ { "print_hide": 1, "description": "Select the currency in which price list is maintained", - "colour": "White:FFF", "doctype": "DocField", "label": "Price List Currency", "options": "link:Currency", @@ -342,7 +337,6 @@ { "print_hide": 1, "description": "Rate at which Price list currency is converted to company's base currency", - "colour": "White:FFF", "doctype": "DocField", "label": "Price List Currency Conversion Rate", "fieldname": "plc_conversion_rate", @@ -351,6 +345,7 @@ "permlevel": 0 }, { + "print_width": "50%", "doctype": "DocField", "width": "50%", "fieldname": "column_break2", @@ -361,7 +356,6 @@ "print_hide": 1, "description": "Customer's Currency", "oldfieldtype": "Select", - "colour": "White:FFF", "doctype": "DocField", "label": "Currency", "oldfieldname": "currency", @@ -376,7 +370,6 @@ "description": "Rate at which customer's currency is converted to company's base currency", "no_copy": 0, "oldfieldtype": "Currency", - "colour": "White:FFF", "doctype": "DocField", "label": "Conversion Rate", "oldfieldname": "conversion_rate", @@ -388,7 +381,6 @@ }, { "oldfieldtype": "Section Break", - "colour": "White:FFF", "doctype": "DocField", "label": "Taxes", "fieldname": "taxes", @@ -399,7 +391,6 @@ "print_hide": 1, "description": "If you have created a standard template in Sales Taxes and Charges Master, select one and click on the button below.", "oldfieldtype": "Link", - "colour": "White:FFF", "doctype": "DocField", "label": "Taxes and Charges", "oldfieldname": "charge", @@ -413,7 +404,6 @@ "oldfieldtype": "Button", "doctype": "DocField", "label": "Get Taxes and Charges", - "trigger": "Client", "fieldname": "get_charges", "fieldtype": "Button", "permlevel": 0 @@ -431,6 +421,7 @@ }, { "print_hide": 1, + "print_width": "150px", "oldfieldtype": "Currency", "doctype": "DocField", "label": "Taxes and Charges Total", @@ -445,7 +436,6 @@ "oldfieldtype": "Button", "doctype": "DocField", "label": "Calculate Charges", - "trigger": "Client", "fieldname": "calculate_charges", "fieldtype": "Button", "permlevel": 0 @@ -461,7 +451,6 @@ { "print_hide": 0, "oldfieldtype": "Section Break", - "colour": "White:FFF", "doctype": "DocField", "label": "Totals", "fieldname": "totals", @@ -470,6 +459,7 @@ }, { "print_hide": 1, + "print_width": "150px", "no_copy": 0, "oldfieldtype": "Currency", "doctype": "DocField", @@ -483,6 +473,7 @@ }, { "print_hide": 1, + "print_width": "150px", "no_copy": 0, "oldfieldtype": "Currency", "doctype": "DocField", @@ -496,9 +487,9 @@ { "print_hide": 1, "description": "In Words will be visible once you save the Delivery Note.", + "print_width": "200px", "no_copy": 0, "oldfieldtype": "Data", - "colour": "White:FFF", "doctype": "DocField", "label": "In Words", "oldfieldname": "in_words", @@ -516,6 +507,7 @@ }, { "print_hide": 0, + "print_width": "150px", "no_copy": 0, "oldfieldtype": "Currency", "doctype": "DocField", @@ -529,6 +521,7 @@ }, { "print_hide": 0, + "print_width": "150px", "no_copy": 0, "oldfieldtype": "Currency", "doctype": "DocField", @@ -542,9 +535,9 @@ { "print_hide": 0, "description": "In Words (Export) will be visible once you save the Delivery Note.", + "print_width": "150px", "no_copy": 0, "oldfieldtype": "Data", - "colour": "White:FFF", "doctype": "DocField", "label": "In Words (Export)", "oldfieldname": "in_words_export", @@ -575,19 +568,16 @@ { "print_hide": 1, "oldfieldtype": "Button", - "colour": "White:FFF", "doctype": "DocField", "label": "Get Terms and Conditions", - "trigger": "Server", + "options": "get_tc_details", "fieldname": "get_terms", "fieldtype": "Button", - "options": "get_tc_details", "permlevel": 0 }, { "print_hide": 1, "oldfieldtype": "HTML", - "colour": "White:FFF", "doctype": "DocField", "label": "Terms and Conditions HTML", "options": "You can add Terms and Notes that will be printed in the Transaction", @@ -597,7 +587,6 @@ }, { "oldfieldtype": "Text Editor", - "colour": "White:FFF", "doctype": "DocField", "label": "Terms and Conditions Details", "oldfieldname": "terms", @@ -615,6 +604,7 @@ }, { "print_hide": 1, + "print_width": "50%", "doctype": "DocField", "width": "50%", "fieldname": "column_break4", @@ -623,20 +613,20 @@ }, { "print_hide": 1, + "print_width": "150px", "no_copy": 0, "oldfieldtype": "Data", - "colour": "White:FFF", "doctype": "DocField", "label": "Transporter Name", "oldfieldname": "transporter_name", "width": "150px", - "trigger": "Client", "fieldname": "transporter_name", "fieldtype": "Data", "reqd": 0, "permlevel": 0 }, { + "print_width": "50%", "doctype": "DocField", "width": "50%", "fieldname": "col_break34", @@ -646,9 +636,9 @@ { "print_hide": 1, "description": "Transporter lorry number", + "print_width": "100px", "no_copy": 0, "oldfieldtype": "Data", - "colour": "White:FFF", "doctype": "DocField", "label": "LR No", "oldfieldname": "lr_no", @@ -660,18 +650,18 @@ }, { "print_hide": 1, + "permlevel": 0, "description": "Date on which lorry started from your warehouse", - "width": "100px", + "print_width": "100px", "default": "Today", "oldfieldtype": "Date", - "colour": "White:FFF", "doctype": "DocField", "label": "LR Date", "oldfieldname": "lr_date", "no_copy": 0, "fieldname": "lr_date", "fieldtype": "Date", - "permlevel": 0 + "width": "100px" }, { "doctype": "DocField", @@ -681,6 +671,7 @@ "permlevel": 0 }, { + "print_width": "50%", "doctype": "DocField", "width": "50%", "fieldname": "col_break20", @@ -698,6 +689,7 @@ "in_filter": 1 }, { + "print_width": "50%", "doctype": "DocField", "width": "50%", "fieldname": "col_break21", @@ -709,12 +701,12 @@ "search_index": 1, "doctype": "DocField", "label": "Territory", - "options": "Territory", + "permlevel": 0, "fieldname": "territory", "fieldtype": "Link", "reqd": 1, "hidden": 0, - "permlevel": 0, + "options": "Territory", "in_filter": 1 }, { @@ -732,7 +724,6 @@ "print_hide": 1, "description": "Filling in Additional Information about the Delivery Note will help you analyze your data better.", "oldfieldtype": "Section Break", - "colour": "White:FFF", "doctype": "DocField", "label": "More Info", "fieldname": "more_info", @@ -742,8 +733,8 @@ { "print_hide": 1, "description": "Time at which items were delivered from warehouse", + "print_width": "100px", "oldfieldtype": "Time", - "colour": "White:FFF", "doctype": "DocField", "label": "Posting Time", "oldfieldname": "posting_time", @@ -758,24 +749,25 @@ { "print_hide": 1, "permlevel": 1, - "width": "150px", + "print_width": "150px", "default": "Draft", "oldfieldtype": "Select", "doctype": "DocField", "label": "Status", "oldfieldname": "status", "no_copy": 1, + "options": "\nDraft\nSubmitted\nCancelled", "fieldname": "status", "fieldtype": "Select", "search_index": 1, "reqd": 1, - "options": "\nDraft\nSubmitted\nCancelled", + "width": "150px", "in_filter": 1 }, { "print_hide": 1, - "allow_on_submit": 1, "oldfieldtype": "Link", + "allow_on_submit": 1, "doctype": "DocField", "label": "Letter Head", "oldfieldname": "letter_head", @@ -788,13 +780,11 @@ "print_hide": 1, "no_copy": 1, "oldfieldtype": "Link", - "colour": "White:FFF", "allow_on_submit": 1, "doctype": "DocField", "label": "Select Print Heading", "oldfieldname": "select_print_heading", "permlevel": 0, - "trigger": "Client", "fieldname": "select_print_heading", "fieldtype": "Link", "options": "Print Heading", @@ -803,12 +793,10 @@ { "description": "Track this Delivery Note against any Project", "oldfieldtype": "Link", - "colour": "White:FFF", "doctype": "DocField", "label": "Project Name", "oldfieldname": "project_name", "permlevel": 0, - "trigger": "Client", "fieldname": "project_name", "fieldtype": "Link", "search_index": 1, @@ -829,7 +817,6 @@ { "print_hide": 1, "oldfieldtype": "Link", - "colour": "White:FFF", "doctype": "DocField", "label": "Campaign", "oldfieldname": "campaign", @@ -841,18 +828,18 @@ }, { "print_hide": 1, - "allow_on_submit": 1, "oldfieldtype": "Check", + "allow_on_submit": 1, "doctype": "DocField", "label": "Print Without Amount", "oldfieldname": "print_without_amount", - "trigger": "Client", "fieldname": "print_without_amount", "fieldtype": "Check", "permlevel": 0 }, { "print_hide": 1, + "print_width": "50%", "oldfieldtype": "Column Break", "doctype": "DocField", "width": "50%", @@ -866,7 +853,6 @@ "description": "% of materials billed against this Delivery Note", "no_copy": 1, "search_index": 1, - "colour": "White:FFF", "doctype": "DocField", "label": "% Amount Billed", "oldfieldname": "per_billed", @@ -893,7 +879,6 @@ "description": "% of materials delivered against this Delivery Note", "no_copy": 1, "search_index": 1, - "colour": "White:FFF", "doctype": "DocField", "label": "% Installed", "oldfieldname": "per_installed", @@ -914,9 +899,10 @@ }, { "print_hide": 1, - "allow_on_submit": 0, + "print_width": "150px", "no_copy": 1, "oldfieldtype": "Data", + "allow_on_submit": 0, "doctype": "DocField", "label": "Amended From", "oldfieldname": "amended_from", @@ -928,6 +914,7 @@ { "print_hide": 1, "description": "The date at which current entry is corrected in the system.", + "print_width": "100px", "no_copy": 1, "oldfieldtype": "Date", "doctype": "DocField", @@ -943,7 +930,6 @@ "description": "Required only for sample item.", "no_copy": 1, "oldfieldtype": "Link", - "colour": "White:FFF", "doctype": "DocField", "label": "To Warehouse", "oldfieldname": "to_warehouse", @@ -956,7 +942,6 @@ { "print_hide": 1, "oldfieldtype": "Data", - "colour": "White:FFF", "doctype": "DocField", "label": "Excise Page Number", "oldfieldname": "excise_page", @@ -977,9 +962,9 @@ { "print_hide": 1, "description": "Select the relevant company name if you have multiple companies", + "print_width": "150px", "permlevel": 0, "oldfieldtype": "Link", - "colour": "White:FFF", "doctype": "DocField", "label": "Company", "oldfieldname": "company", @@ -993,6 +978,7 @@ }, { "print_hide": 1, + "print_width": "150px", "permlevel": 0, "oldfieldtype": "Select", "doctype": "DocField", @@ -1010,7 +996,6 @@ "print_hide": 1, "no_copy": 1, "oldfieldtype": "Data", - "colour": "White:FFF", "doctype": "DocField", "label": "Cancel Reason", "oldfieldname": "cancel_reason", @@ -1043,7 +1028,6 @@ { "print_hide": 1, "oldfieldtype": "Section Break", - "colour": "White:FFF", "doctype": "DocField", "label": "Sales Team", "fieldname": "sales_team_section_break", @@ -1052,6 +1036,7 @@ }, { "print_hide": 1, + "print_width": "50%", "doctype": "DocField", "width": "50%", "fieldname": "column_break6", @@ -1061,19 +1046,20 @@ { "print_hide": 1, "permlevel": 0, + "print_width": "150px", "no_copy": 0, "oldfieldtype": "Link", "doctype": "DocField", "label": "Sales Partner", "oldfieldname": "sales_partner", "width": "150px", - "trigger": "Client", "fieldname": "sales_partner", "fieldtype": "Link", "options": "Sales Partner" }, { "print_hide": 1, + "print_width": "50%", "doctype": "DocField", "width": "50%", "fieldname": "column_break7", @@ -1082,13 +1068,13 @@ }, { "print_hide": 1, + "print_width": "100px", "no_copy": 0, "oldfieldtype": "Currency", "doctype": "DocField", "label": "Commission Rate (%)", "oldfieldname": "commission_rate", "width": "100px", - "trigger": "Client", "fieldname": "commission_rate", "fieldtype": "Currency", "permlevel": 0 @@ -1097,11 +1083,9 @@ "print_hide": 1, "no_copy": 0, "oldfieldtype": "Currency", - "colour": "White:FFF", "doctype": "DocField", "label": "Total Commission", "oldfieldname": "total_commission", - "trigger": "Client", "fieldname": "total_commission", "fieldtype": "Currency", "permlevel": 0 @@ -1145,8 +1129,12 @@ "permlevel": 0 }, { + "amend": 0, + "create": 0, "doctype": "DocPerm", + "submit": 0, "role": "Accounts User", + "cancel": 0, "permlevel": 1 }, { @@ -1157,8 +1145,7 @@ "write": 1, "role": "Sales User", "cancel": 1, - "permlevel": 0, - "match": "" + "permlevel": 0 }, { "amend": 0, @@ -1173,13 +1160,17 @@ { "doctype": "DocPerm", "role": "Customer", - "match": "customer_name", - "permlevel": 0 + "permlevel": 0, + "match": "customer_name" }, { - "write": 1, + "amend": 0, + "create": 0, "doctype": "DocPerm", + "submit": 0, + "write": 1, "role": "All", + "cancel": 0, "permlevel": 2 }, { From 55963a416414799b583b7de1e69061bab00e9d9b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 9 Jan 2013 14:50:01 +0530 Subject: [PATCH 04/10] added field description in employee --- hr/doctype/employee/employee.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hr/doctype/employee/employee.txt b/hr/doctype/employee/employee.txt index 0c48287afd..6e3e8288f5 100644 --- a/hr/doctype/employee/employee.txt +++ b/hr/doctype/employee/employee.txt @@ -2,9 +2,9 @@ { "owner": "Administrator", "docstatus": 0, - "creation": "2012-12-03 10:13:46", + "creation": "2013-01-02 16:17:01", "modified_by": "Administrator", - "modified": "2012-12-27 14:45:31" + "modified": "2013-01-09 14:46:42" }, { "autoname": "naming_series:", @@ -150,6 +150,7 @@ "permlevel": 0 }, { + "description": "You can enter any date manually", "oldfieldtype": "Date", "doctype": "DocField", "label": "Date of Birth", From b00ecc72c7423ac40a9c9c2191f955ba3790f2b3 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 9 Jan 2013 15:18:18 +0530 Subject: [PATCH 05/10] fixed latest updates page --- home/page/latest_updates/latest_updates.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/page/latest_updates/latest_updates.js b/home/page/latest_updates/latest_updates.js index 97ee5612f0..e8b30cf422 100644 --- a/home/page/latest_updates/latest_updates.js +++ b/home/page/latest_updates/latest_updates.js @@ -1,6 +1,6 @@ erpnext.updates = [ ["7th January 2013", [ - "Language (backend): Integrated language libraries." + "Language (backend): Integrated language libraries."]], ["4th January 2013", [ "Support Analytics: Simple Tool to Plot Number Tickets and time to Closing", "Workflow: Added Workflow Help", From ce1d5276ffd7ce2b15cddf1bcba247f3c5ff2abf Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 9 Jan 2013 16:39:27 +0530 Subject: [PATCH 06/10] added moduleview --- .../page/accounts_home/accounts_home.html | 142 ----------- accounts/page/accounts_home/accounts_home.js | 193 +++++++++++++-- buying/page/buying_home/buying_home.html | 90 ------- buying/page/buying_home/buying_home.js | 122 ++++++++-- .../supplier_quotations.txt | 19 -- home/page/desktop/desktop.css | 1 - hr/page/hr_home/hr_home.html | 135 ----------- hr/page/hr_home/hr_home.js | 161 +++++++++++-- .../manufacturing_home.html | 48 ---- .../manufacturing_home/manufacturing_home.js | 79 +++++-- .../locale/_messages_doc.json | 10 - .../bom_replace_tool/locale/hi-doc.json | 10 - .../page/projects_home/projects_home.html | 38 --- projects/page/projects_home/projects_home.js | 66 ++++-- public/js/modules.js | 2 + selling/page/sales_browser/sales_browser.py | 2 +- selling/page/selling_home/selling_home.html | 136 ----------- selling/page/selling_home/selling_home.js | 181 ++++++++++++-- startup/event_handlers.py | 18 +- startup/observers.py | 1 + startup/open_count.py | 26 +++ stock/page/stock_home/stock_home.html | 143 ------------ stock/page/stock_home/stock_home.js | 220 ++++++++++++++++-- support/page/support_home/support_home.html | 58 ----- support/page/support_home/support_home.js | 95 ++++++-- .../doctype/style_settings/style_settings.txt | 61 +++-- website/page/website_home/website_home.html | 47 ---- website/page/website_home/website_home.js | 99 ++++++-- 28 files changed, 1117 insertions(+), 1086 deletions(-) delete mode 100644 accounts/page/accounts_home/accounts_home.html delete mode 100644 buying/page/buying_home/buying_home.html delete mode 100644 buying/report/supplier_quotations/supplier_quotations.txt delete mode 100644 hr/page/hr_home/hr_home.html delete mode 100644 manufacturing/page/manufacturing_home/manufacturing_home.html delete mode 100644 production/doctype/bom_replace_tool/locale/_messages_doc.json delete mode 100644 production/doctype/bom_replace_tool/locale/hi-doc.json delete mode 100644 projects/page/projects_home/projects_home.html delete mode 100644 selling/page/selling_home/selling_home.html create mode 100644 startup/open_count.py delete mode 100644 stock/page/stock_home/stock_home.html delete mode 100644 support/page/support_home/support_home.html delete mode 100644 website/page/website_home/website_home.html diff --git a/accounts/page/accounts_home/accounts_home.html b/accounts/page/accounts_home/accounts_home.html deleted file mode 100644 index 498b214587..0000000000 --- a/accounts/page/accounts_home/accounts_home.html +++ /dev/null @@ -1,142 +0,0 @@ -
-
-
-
-
Journal Voucher
-

General Ledger Entries

-
-
Sales Invoice
-

Bills raised to Customers

-
-
Purchase Invoice
-

Bills raised by Suppliers

-
-
-
Chart of Accounts
-

Structure of books of accounts

-
-
Chart of Cost Centers
-

Structure cost centers

-
-
-
-

Reports

-
-
- General Ledger -
-

General Ledger Report

-
-
Trial Balance -
-

Tree view of all Account balances

-
-
-
- Financial Analytics -
-

Visual representation of financial trends

-
-
-
-
-
- -
-
diff --git a/accounts/page/accounts_home/accounts_home.js b/accounts/page/accounts_home/accounts_home.js index 3815578d34..d207fafa62 100644 --- a/accounts/page/accounts_home/accounts_home.js +++ b/accounts/page/accounts_home/accounts_home.js @@ -1,25 +1,172 @@ -// ERPNext - web based ERP (http://erpnext.com) -// Copyright (C) 2012 Web Notes Technologies Pvt Ltd -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd +// GNU General Public License. See "license.txt" + +wn.module_page["Accounts"] = [ + { + title: wn._("Documents"), + icon: "icon-copy", + items: [ + { + label: wn._("Journal Voucher"), + description: wn._("Accounting journal entries."), + doctype:"Journal Voucher" + }, + { + label: wn._("Sales Invoice"), + description: wn._("Bills raised to Customers."), + doctype:"Sales Invoice" + }, + { + label: wn._("Purchase Invoice"), + description: wn._("Bills raised by Suppliers."), + doctype:"Purchase Invoice" + }, + ] + }, + { + title: wn._("Masters"), + icon: "icon-book", + items: [ + { + label: wn._("Chart of Accounts"), + route: "Accounts Browser/Account", + description: wn._("Structure of books of accounts."), + doctype:"Account" + }, + { + label: wn._("Chart of Cost Centers"), + route: "Accounts Browser/Cost Center", + description: wn._("Structure cost centers for budgeting."), + doctype:"Cost Center" + }, + ] + }, + { + title: wn._("Tools"), + icon: "icon-wrench", + items: [ + { + "route":"#Form/Bank Reconciliation/Bank Reconciliation", + "label": wn._("Bank Reconciliation"), + "description": wn._("Update bank payment dates with journals."), + doctype: "Bank Reconciliation" + }, + { + "route":"#Form/Payment to Invoice Matching Tool/Payment to Invoice Matching Tool", + "label": wn._("Payment Reconciliation"), + "description": wn._("Match non-linked Invoices and Payments."), + doctype: "Payment to Invoice Matching Tool" + + }, + { + "label": wn._("Period Closing Voucher"), + "doctype": "Period Closing Voucher", + description: "Close Balance Sheet and book Profit or Loss." + }, + { + "route":"#Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool", + "label": wn._("Sales and Purchase Return Tool"), + description: wn._("Manage sales or purchase returns"), + "doctype": "Sales and Purchase Return Tool" + }, + { + "page":"voucher-import-tool", + "label": wn._("Voucher Import Tool"), + "description": "Import accounting entries from CSV." + }, + ] + }, + { + title: wn._("Setup"), + icon: "icon-cog", + items: [ + { + "label": wn._("Sales Taxes and Charges Master"), + "doctype":"Sales Taxes and Charges Master", + "description": wn._("Tax Template for Sales") + }, + { + "label": wn._("Purchase Taxes and Charges Master"), + "doctype":"Purchase Taxes and Charges Master", + "description": wn._("Tax Template for Purchase") + }, + { + "label": wn._("Point-of-Sale Setting"), + "doctype":"POS Setting", + "description": "User settings for Point-of-sale (POS)" + }, + { + "doctype":"Budget Distribution", + "label": wn._("Budget Distribution"), + "description": wn._("Seasonality for setting budgets.") + }, + { + "doctype":"Terms and Conditions", + "label": wn._("Terms and Conditions Template"), + description: wn._("Template of terms or contract.") + }, + { + "doctype":"Mode of Payment", + "label": wn._("Mode of Payment"), + description: wn._("e.g. Bank, Cash, Credit Card") + }, + { + "doctype":"C-Form", + "label": wn._("C-Form"), + description: "C-Form records", + country: "India" + } + ] + }, + { + title: wn._("Main Reports"), + right: true, + icon: "icon-table", + items: [ + { + "label":wn._("General Ledger"), + page: "general-ledger" + }, + { + "label":wn._("Trial Balance"), + page: "trial-balance" + }, + { + "page":"Financial Statements", + "label": wn._("Financial Statements") + }, + ] + }, + { + title: wn._("Analytics"), + right: true, + icon: "icon-bar-chart", + items: [ + { + "label":wn._("Financial Analytics"), + page: "financial-analytics" + }, + ] + }, + { + title: wn._("Reports"), + right: true, + icon: "icon-list", + items: [ + { + "label":wn._("Delivered Items To Be Billed"), + route: "query-report/Delivered Items To Be Billed", + doctype: "Sales Invoice" + }, + { + "label":wn._("Ordered Items To Be Billed"), + route: "query-report/Ordered Items To Be Billed", + doctype: "Sales Invoice" + }, + ] + } +] pscript['onload_accounts-home'] = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Accounts'); - erpnext.module_page.setup_page('Accounts', wrapper); - - if(wn.control_panel.country!='India') { - $('.india-specific').toggle(false); - } - -} + wn.views.moduleview.make(wrapper, "Accounts"); +} \ No newline at end of file diff --git a/buying/page/buying_home/buying_home.html b/buying/page/buying_home/buying_home.html deleted file mode 100644 index 785abd5ac8..0000000000 --- a/buying/page/buying_home/buying_home.html +++ /dev/null @@ -1,90 +0,0 @@ -
-
-
-
-
Purchase Request
-

Request for purchase

-
-
Supplier Quotation (beta)
-

Track Quotations received from Suppliers

-
-
Purchase Order
-

Purchase Orders given to Suppliers

-
-
-
Supplier
-

Supplier Master

-
-
Item
-

Item Master

-
-
Contact
-

Contact Master

-
-
Address
-

Address Master

-
-
-
-

Reports

-
-
- Purchase Analytics -
-

Purchase trends based on Purchase Invoice

-
-
-
-
-
-
-
-
-
- -
-
Tools
-
- -
-
- -
-
-
-
diff --git a/buying/page/buying_home/buying_home.js b/buying/page/buying_home/buying_home.js index 65803cca54..e46a77c583 100644 --- a/buying/page/buying_home/buying_home.js +++ b/buying/page/buying_home/buying_home.js @@ -1,20 +1,106 @@ -// ERPNext - web based ERP (http://erpnext.com) -// Copyright (C) 2012 Web Notes Technologies Pvt Ltd -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd +// GNU General Public License. See "license.txt" + +wn.module_page["Buying"] = [ + { + title: wn._("Documents"), + icon: "icon-copy", + items: [ + { + label: wn._("Purchase Request"), + description: wn._("Request for purchase."), + doctype:"Purchase Request" + }, + { + label: wn._("Supplier Quotation"), + description: wn._("Track Quotations received from Suppliers."), + doctype:"Supplier Quotation" + }, + { + label: wn._("Purchase Order"), + description: wn._("Purchase Orders given to Suppliers."), + doctype:"Purchase Order" + }, + ] + }, + { + title: wn._("Masters"), + icon: "icon-book", + items: [ + { + label: wn._("Supplier"), + description: wn._("Supplier database."), + doctype:"Supplier" + }, + { + label: wn._("Contact"), + description: wn._("All Contacts."), + doctype:"Contact" + }, + { + label: wn._("Address"), + description: wn._("All Addresses."), + doctype:"Address" + }, + { + label: wn._("Item"), + description: wn._("All Products or Services."), + doctype:"Item" + }, + ] + }, + { + title: wn._("Setup"), + icon: "icon-cog", + items: [ + { + "label": wn._("Purchase Taxes and Charges Master"), + "doctype":"Purchase Taxes and Charges Master", + "description": wn._("Tax Template for Purchase") + }, + { + "doctype":"Supplier Type", + "label": wn._("Supplier Type"), + "description": wn._("Supplier classification.") + }, + { + "route":"Sales Browser/Item Group", + "label":wn._("Item Group"), + "description": wn._("Tree of item classification"), + doctype:"Item Group" + }, + { + label: wn._("Terms and Conditions"), + description: wn._("Template of terms or contract."), + doctype:"Terms and Conditions" + }, + ] + }, + { + title: wn._("Tools"), + icon: "icon-wrench", + items: [ + { + "route":"Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool", + "label":wn._("Purchase Returns"), + "description":wn._("Helper for managing return of goods (sales or purchase)"), + doctype: "Sales and Purchase Return Tool" + }, + ] + }, + { + title: wn._("Analytics"), + right: true, + icon: "icon-bar-chart", + items: [ + { + "label":wn._("Purchase Analytics"), + page: "purchase-analytics" + }, + ] + }, +] pscript['onload_buying-home'] = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Buying'); - erpnext.module_page.setup_page('Buying', wrapper); -} \ No newline at end of file + wn.views.moduleview.make(wrapper, "Buying"); +} diff --git a/buying/report/supplier_quotations/supplier_quotations.txt b/buying/report/supplier_quotations/supplier_quotations.txt deleted file mode 100644 index ab4f872b59..0000000000 --- a/buying/report/supplier_quotations/supplier_quotations.txt +++ /dev/null @@ -1,19 +0,0 @@ -[ - { - "owner": "Administrator", - "docstatus": 0, - "creation": "2012-08-07 14:52:42", - "modified_by": "Administrator", - "modified": "2012-12-03 17:10:41" - }, - { - "name": "__common__", - "ref_doctype": "Supplier Quotation", - "doctype": "Report", - "json": "{\"filters\":[[\"Supplier Quotation\",\"supplier\",\"like\",\"%%\"],[\"Supplier Quotation Item\",\"item_code\",\"like\",\"%%\"]],\"columns\":[[\"name\",\"Supplier Quotation\"],[\"supplier\",\"Supplier Quotation\"],[\"item_code\",\"Supplier Quotation Item\"],[\"description\",\"Supplier Quotation Item\"],[\"qty\",\"Supplier Quotation Item\"],[\"currency\",\"Supplier Quotation\"],[\"import_rate\",\"Supplier Quotation Item\"],[\"import_amount\",\"Supplier Quotation Item\"]],\"sort_by\":\"modified\",\"sort_order\":\"desc\",\"sort_by_next\":\"name\",\"sort_order_next\":\"desc\"}" - }, - { - "name": "Supplier Quotations", - "doctype": "Report" - } -] \ No newline at end of file diff --git a/home/page/desktop/desktop.css b/home/page/desktop/desktop.css index 7990216ed4..1fb4414ca0 100644 --- a/home/page/desktop/desktop.css +++ b/home/page/desktop/desktop.css @@ -25,7 +25,6 @@ .case-wrapper i { font-size: 32px; color: #f8f8f8; - margin-top: 8px; } .case-label { diff --git a/hr/page/hr_home/hr_home.html b/hr/page/hr_home/hr_home.html deleted file mode 100644 index 9d6875a994..0000000000 --- a/hr/page/hr_home/hr_home.html +++ /dev/null @@ -1,135 +0,0 @@ -
-
-
-
-
Attendance
-

Attendance Mark

-
-
Leave Application
-

Applications for leave

-
-
Expense Claim
-

Claims for expenses

-
-
Salary Slip
-

Monthly salary statement

-
-
Appraisal
-

Performance appraisal

-
-
-
Employee
-

Employee Master

-
-
-
-

Reports

-
-
-
-
-
-
Leave and Attendance
- -
-
-
Salary and Payroll
- -
-
-
Employee Setup
-
- - -
- Branch -
- - -
- Grade -
-
-
-
-
Expense Claim
- -
-
-
-
-
diff --git a/hr/page/hr_home/hr_home.js b/hr/page/hr_home/hr_home.js index 1286609587..79b8afc6e6 100644 --- a/hr/page/hr_home/hr_home.js +++ b/hr/page/hr_home/hr_home.js @@ -1,20 +1,147 @@ -// ERPNext - web based ERP (http://erpnext.com) -// Copyright (C) 2012 Web Notes Technologies Pvt Ltd -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd +// GNU General Public License. See "license.txt" + +wn.module_page["HR"] = [ + { + title: wn._("Documents"), + icon: "icon-copy", + items: [ + { + label: wn._("Leave Application"), + description: wn._("Applications for leave."), + doctype:"Leave Application" + }, + { + label: wn._("Expense Claim"), + description: wn._("Claims for expenses made on behalf of the organization."), + doctype:"Expense Claim" + }, + { + label: wn._("Attendance"), + description: wn._("Attendance record."), + doctype:"Attendance" + }, + { + label: wn._("Salary Slip"), + description: wn._("Monthly salary statement."), + doctype:"Salary Slip" + }, + { + label: wn._("Appraisal"), + description: wn._("Performance appraisal."), + doctype:"Appraisal" + }, + ] + }, + { + title: wn._("Masters"), + icon: "icon-book", + items: [ + { + label: wn._("Employee"), + description: wn._("Employee records."), + doctype:"Employee" + }, + ] + }, + { + title: wn._("Leave Setup"), + icon: "icon-cog", + items: [ + { + "route":"Form/Attendance Control Panel/Attendance Control Panel", + "label":wn._("Upload attendance"), + "description":wn._("Upload attendance from a .csv file"), + doctype: "Attendance Control Panel" + }, + { + "route":"Form/Leave Control Panel/Leave Control Panel", + "label": wn._("Leave Allocation Tool"), + "description": wn._("Allocate leaves for the year."), + doctype: "Leave Control Panel" + }, + { + "label":wn._("Leave Allocation"), + "description":wn._("Leave allocations."), + doctype: "Leave Allocation" + }, + { + "label":wn._("Leave Type"), + "description":wn._("Type of leaves like casual, sick etc."), + doctype: "Leave Type" + }, + { + "label":wn._("Holiday List"), + "description":wn._("List of holidays."), + doctype: "Holiday List" + }, + ] + }, + { + title: wn._("Payroll Setup"), + icon: "icon-cog", + items: [ + { + "label": wn._("Salary Structure"), + "description": wn._("Monthly salary template."), + doctype: "Salary Structure" + }, + { + "route":"#Form/Salary Manager/Salary Manager", + "label":wn._("Process Payroll"), + "description":wn._("Generate Salary Slips"), + doctype: "Salary Manager" + }, + { + "label": wn._("Earning Type"), + "description": wn._("Salary components."), + doctype: "Earning Type" + }, + { + "label": wn._("Deduction Type"), + "description": wn._("Tax and other salary deductions."), + doctype: "Deduction Type" + }, + ] + }, + { + title: wn._("Employee Setup"), + icon: "icon-cog", + items: [ + { + "label": wn._("Employment Type"), + "description": wn._("Type of employment master."), + doctype: "Employment Type" + }, + { + "label": wn._("Appraisal Template"), + "description": wn._("Template for employee performance appraisals."), + doctype: "Appraisal Template" + }, + { + "label": wn._("Expense Claim Type"), + "description": wn._("Types of Expense Claim."), + doctype: "Expense Claim Type" + }, + { + "label": wn._("Branch"), + "description": wn._("Company branches."), + doctype: "Branch" + }, + { + "label": wn._("Department"), + "description": wn._("Company departments."), + doctype: "Department" + }, + { + "label": wn._("Grade"), + "description": wn._("Employee grades"), + doctype: "Grade" + }, + ] + } +]; pscript['onload_hr-home'] = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area') ,'Human Resources'); - erpnext.module_page.setup_page('HR', wrapper); + wn.views.moduleview.make(wrapper, "HR"); } \ No newline at end of file diff --git a/manufacturing/page/manufacturing_home/manufacturing_home.html b/manufacturing/page/manufacturing_home/manufacturing_home.html deleted file mode 100644 index 737a7c1b11..0000000000 --- a/manufacturing/page/manufacturing_home/manufacturing_home.html +++ /dev/null @@ -1,48 +0,0 @@ -
-
-
-
-
Production Order
-

Orders for manufacturing

-
-
Production Plan
-

Generate Purchase Requisition (MRP) and Production Orders

-
-
-
Bill of Materials
-

Bill of Materials (BOM) Master

-
-
Item
-

Item Master

-
-
-
-

Reports

-
-
-
-
-
-
Tools
- -
-
-
Setup
-
- -
-
-
-
-
-
diff --git a/manufacturing/page/manufacturing_home/manufacturing_home.js b/manufacturing/page/manufacturing_home/manufacturing_home.js index ee4778d5d3..cb4222b367 100644 --- a/manufacturing/page/manufacturing_home/manufacturing_home.js +++ b/manufacturing/page/manufacturing_home/manufacturing_home.js @@ -1,20 +1,65 @@ -// ERPNext - web based ERP (http://erpnext.com) -// Copyright (C) 2012 Web Notes Technologies Pvt Ltd -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd +// GNU General Public License. See "license.txt" + +wn.module_page["Manufacturing"] = [ + { + title: wn._("Documents"), + icon: "icon-copy", + items: [ + { + label: wn._("Production Order"), + description: wn._("Orders released for production."), + doctype:"Production Order" + }, + ] + }, + { + title: wn._("Production Planning (MRP)"), + icon: "icon-wrench", + items: [ + { + "route":"Form/Production Planning Tool/Production Planning Tool", + "label":wn._("Production Planning Tool"), + "description":wn._("Generate Purchase Requests (MRP) and Production Orders."), + doctype: "Production Planning Tool" + }, + ] + }, + { + title: wn._("Masters"), + icon: "icon-book", + items: [ + { + label: wn._("Bill of Materials"), + description: wn._("Bill of Materials (BOM)"), + doctype:"BOM" + }, + { + label: wn._("Item"), + description: wn._("All Products or Services."), + doctype:"Item" + }, + { + label: wn._("Workstation"), + description: wn._("Where manufacturing operations are carried out."), + doctype:"Workstation" + }, + ] + }, + { + title: wn._("Utility"), + icon: "icon-wrench", + items: [ + { + "route":"Form/BOM Replace Tool/BOM Replace Tool", + "label":wn._("BOM Replace Tool"), + "description":wn._("Replace Item / BOM in all BOMs"), + doctype: "BOM Replace Tool" + }, + ] + }, +] pscript['onload_manufacturing-home'] = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Manufacturing'); - erpnext.module_page.setup_page('Manufacturing', wrapper); + wn.views.moduleview.make(wrapper, "Manufacturing"); } \ No newline at end of file diff --git a/production/doctype/bom_replace_tool/locale/_messages_doc.json b/production/doctype/bom_replace_tool/locale/_messages_doc.json deleted file mode 100644 index d6c8d69198..0000000000 --- a/production/doctype/bom_replace_tool/locale/_messages_doc.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - "BOM Replace Tool", - "The BOM which will be replaced", - "New BOM", - "The new BOM after replacement", - "Production", - "Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate \"BOM Explosion Item\" table as per new BOM", - "Replace", - "Current BOM" -] \ No newline at end of file diff --git a/production/doctype/bom_replace_tool/locale/hi-doc.json b/production/doctype/bom_replace_tool/locale/hi-doc.json deleted file mode 100644 index 3d9e9b4fb1..0000000000 --- a/production/doctype/bom_replace_tool/locale/hi-doc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "BOM Replace Tool": "\u092c\u0940\u0913\u090f\u092e \u092c\u0926\u0932\u0947\u0902 \u0909\u092a\u0915\u0930\u0923", - "Current BOM": "\u0935\u0930\u094d\u0924\u092e\u093e\u0928 \u092c\u0940\u0913\u090f\u092e", - "New BOM": "\u0928\u0908 \u092c\u0940\u0913\u090f\u092e", - "Production": "\u0909\u0924\u094d\u092a\u093e\u0926\u0928", - "Replace": "\u092c\u0926\u0932\u0947\u0902", - "Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate \"BOM Explosion Item\" table as per new BOM": "\u0905\u0928\u094d\u092f \u0938\u092d\u0940 BOMs \u091c\u0939\u093e\u0902 \u092f\u0939 \u092a\u094d\u0930\u092f\u094b\u0917 \u0915\u093f\u092f\u093e \u091c\u093e\u0924\u093e \u0939\u0948 \u092e\u0947\u0902 \u090f\u0915 \u0935\u093f\u0936\u0947\u0937 \u092c\u0940\u0913\u090f\u092e \u092c\u0926\u0932\u0947\u0902. \u092f\u0939 \u092a\u0941\u0930\u093e\u0928\u0947 \u092c\u0940\u0913\u090f\u092e \u0932\u093f\u0902\u0915 \u0915\u0940 \u091c\u0917\u0939, \u0932\u093e\u0917\u0924 \u0905\u0926\u094d\u092f\u0924\u0928 \u0914\u0930 \u0928\u092f\u093e \u092c\u0940\u0913\u090f\u092e \u0915\u0947 \u0905\u0928\u0941\u0938\u093e\u0930 "BOM \u0927\u092e\u093e\u0915\u093e \u0906\u0907\u091f\u092e" \u0924\u093e\u0932\u093f\u0915\u093e \u092a\u0941\u0928\u0930\u094d\u091c\u0928\u094d\u092e", - "The BOM which will be replaced": "\u092c\u0940\u0913\u090f\u092e \u091c\u094b \u092a\u094d\u0930\u0924\u093f\u0938\u094d\u0925\u093e\u092a\u093f\u0924 \u0915\u093f\u092f\u093e \u091c\u093e\u090f\u0917\u093e", - "The new BOM after replacement": "\u092c\u0926\u0932\u0928\u0947 \u0915\u0947 \u092c\u093e\u0926 \u0928\u090f \u092c\u0940\u0913\u090f\u092e" -} \ No newline at end of file diff --git a/projects/page/projects_home/projects_home.html b/projects/page/projects_home/projects_home.html deleted file mode 100644 index cb4f1f8aba..0000000000 --- a/projects/page/projects_home/projects_home.html +++ /dev/null @@ -1,38 +0,0 @@ -
-
-
-
-
Task
-

Project activity / task

-
-
Project
-

Project master

-
-
Timesheet
-

Timesheet for tasks

-
-
-
Gantt Chart
-

Gantt chart of all tasks

-
-
-
-

Reports

-
-
-
-
-
-
Setup
-
- -
-
-
-
-
-
diff --git a/projects/page/projects_home/projects_home.js b/projects/page/projects_home/projects_home.js index 5ff50c9a98..3f91468030 100644 --- a/projects/page/projects_home/projects_home.js +++ b/projects/page/projects_home/projects_home.js @@ -1,20 +1,52 @@ -// ERPNext - web based ERP (http://erpnext.com) -// Copyright (C) 2012 Web Notes Technologies Pvt Ltd -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd +// GNU General Public License. See "license.txt" + +wn.module_page["Projects"] = [ + { + title: wn._("Documents"), + icon: "icon-copy", + items: [ + { + label: wn._("Task"), + description: wn._("Project activity / task."), + doctype:"Task" + }, + { + label: wn._("Project"), + description: wn._("Project master."), + doctype:"Project" + }, + { + label: wn._("Timesheet"), + description: wn._("Timesheet for tasks."), + doctype:"Timesheet" + }, + ] + }, + { + title: wn._("Tools"), + icon: "icon-wrench", + items: [ + { + page: "Projects", + label: wn._("Gantt Chart"), + "description":wn._("Gantt chart of all tasks.") + }, + ] + }, + { + title: wn._("Masters"), + icon: "icon-book", + items: [ + { + label: wn._("Activity Type"), + description: wn._("Types of activities for Time Sheets"), + doctype:"Activity Type" + }, + ] + }, +] pscript['onload_projects-home'] = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Projects'); - erpnext.module_page.setup_page('Projects', wrapper); + wn.views.moduleview.make(wrapper, "Projects"); } \ No newline at end of file diff --git a/public/js/modules.js b/public/js/modules.js index 752d3699fd..5c572dda8e 100644 --- a/public/js/modules.js +++ b/public/js/modules.js @@ -15,6 +15,8 @@ // along with this program. If not, see . wn.home_page = "desktop"; +wn.provide("wn.module_page"); + $.extend(wn.modules, { "Selling": { link: "selling-home", diff --git a/selling/page/sales_browser/sales_browser.py b/selling/page/sales_browser/sales_browser.py index 49a05ff578..45ca1d25fb 100644 --- a/selling/page/sales_browser/sales_browser.py +++ b/selling/page/sales_browser/sales_browser.py @@ -13,7 +13,7 @@ def get_children(): if(is_group='Yes', 1, 0) as expandable from `tab%(ctype)s` where docstatus < 2 - and %(parent_field)s = "%(parent)s" + and ifnull(%(parent_field)s,'') = "%(parent)s" order by name""" % webnotes.form_dict, as_dict=1) @webnotes.whitelist() diff --git a/selling/page/selling_home/selling_home.html b/selling/page/selling_home/selling_home.html deleted file mode 100644 index e483b508b4..0000000000 --- a/selling/page/selling_home/selling_home.html +++ /dev/null @@ -1,136 +0,0 @@ -
-
-
-
-
Lead
-

Prospective customers

-
-
Opportunity
-

Business opportunities

-
-
Quotation
-

Quotes sent to Leads / Customers

-
-
Sales Order
-

Confirmed orders from Customers

-
-
Communication
-

All communication records

-
-
-
Customer
-

Customer Master

-
-
Item
-

Item Master

-
-
Contact
-

Contact Master

-
-
Address
-

Address Master

-
-
-
-

Reports

-
-
Sales Analytics -
-

Sales trends based on Sales Invoice

-
-
-
-
-
-
-
-
-
- -
-
Tools
- -
-
-
-
-
diff --git a/selling/page/selling_home/selling_home.js b/selling/page/selling_home/selling_home.js index 1fe0e09d10..6f140e9552 100644 --- a/selling/page/selling_home/selling_home.js +++ b/selling/page/selling_home/selling_home.js @@ -1,20 +1,167 @@ -// ERPNext - web based ERP (http://erpnext.com) -// Copyright (C) 2012 Web Notes Technologies Pvt Ltd -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd +// GNU General Public License. See "license.txt" + +wn.module_page["Selling"] = [ + { + title: wn._("Documents"), + icon: "icon-copy", + items: [ + { + label: wn._("Lead"), + description: wn._("Database of potential customers."), + doctype:"Lead" + }, + { + label: wn._("Opportunity"), + description: wn._("Potential opportunities for selling."), + doctype:"Opportunity" + }, + { + label: wn._("Quotation"), + description: wn._("Quotes to Leads or Customers."), + doctype:"Quotation" + }, + { + label: wn._("Sales Order"), + description: wn._("Confirmed orders from Customers."), + doctype:"Sales Order" + }, + ] + }, + { + title: wn._("Masters"), + icon: "icon-book", + items: [ + { + label: wn._("Customer"), + description: wn._("Customer database."), + doctype:"Customer" + }, + { + label: wn._("Contact"), + description: wn._("All Contacts."), + doctype:"Contact" + }, + { + label: wn._("Address"), + description: wn._("All Addresses."), + doctype:"Address" + }, + { + label: wn._("Item"), + description: wn._("All Products or Services."), + doctype:"Item" + }, + ] + }, + { + title: wn._("Setup"), + icon: "icon-cog", + items: [ + { + label: wn._("Sales Taxes and Charges Master"), + description: wn._("Sales taxes template."), + doctype:"Sales Taxes and Charges Master" + }, + { + label: wn._("Price List"), + description: wn._("Mupltiple Item prices."), + doctype:"Price List" + }, + { + label: wn._("Sales BOM"), + description: wn._("Bundle items at time of sale."), + doctype:"Sales BOM" + }, + { + label: wn._("Terms and Conditions"), + description: wn._("Template of terms or contract."), + doctype:"Terms and Conditions" + }, + { + label: wn._("Customer Group"), + description: wn._("Customer classification tree."), + route: "Sales Browser/Customer Group", + doctype:"Customer Group" + }, + { + label: wn._("Territory"), + description: wn._("Sales territories."), + route: "Sales Browser/Territory", + doctype:"Territory" + }, + { + "route":"Sales Browser/Sales Person", + "label":wn._("Sales Person"), + "description": wn._("Sales persons and targets"), + doctype:"Sales Person" + }, + { + "route":"List/Sales Partner", + "label": wn._("Sales Partner"), + "description":wn._("Commission partners and targets"), + doctype:"Sales Partner" + }, + { + "route":"Sales Browser/Item Group", + "label":wn._("Item Group"), + "description": wn._("Tree of item classification"), + doctype:"Item Group" + }, + { + "route":"List/Campaign", + "label":wn._("Campaign"), + "description":wn._("Sales campaigns"), + doctype:"Campaign" + }, + ] + }, + { + title: wn._("Tools"), + icon: "icon-wrench", + items: [ + { + "route":"Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool", + "label":wn._("Sales Returns"), + "description":wn._("Helper for managing return of goods (sales or purchase)"), + doctype: "Sales and Purchase Return Tool" + }, + { + "route":"Form/SMS Center/SMS Center", + "label":wn._("SMS Center"), + "description":wn._("Send mass SMS to your contacts"), + doctype:"SMS Center" + }, + ] + }, + { + title: wn._("Analytics"), + right: true, + icon: "icon-bar-chart", + items: [ + { + "label":wn._("Sales Analytics"), + page: "sales-analytics" + }, + ] + }, + { + title: wn._("Reports"), + right: true, + icon: "icon-list", + items: [ + { + "label":wn._("Customer Addresses and Contacts"), + route: "query-report/Customer Addresses and Contacts" + }, + { + "label":wn._("Sales Orders Pending to be Delivered"), + route: "query-report/Sales Orders Pending to be Delivered" + }, + ] + } +] pscript['onload_selling-home'] = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Selling'); - erpnext.module_page.setup_page('Selling', wrapper); + wn.views.moduleview.make(wrapper, "Selling"); } \ No newline at end of file diff --git a/startup/event_handlers.py b/startup/event_handlers.py index 16fb523de3..6b16f4c4d3 100644 --- a/startup/event_handlers.py +++ b/startup/event_handlers.py @@ -1,18 +1,6 @@ -# ERPNext - web based ERP (http://erpnext.com) -# Copyright (C) 2012 Web Notes Technologies Pvt Ltd -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd +# GNU General Public License. See "license.txt" + from __future__ import unicode_literals import webnotes diff --git a/startup/observers.py b/startup/observers.py index 7dad77afc8..46683f8d9b 100644 --- a/startup/observers.py +++ b/startup/observers.py @@ -17,4 +17,5 @@ observer_map = { "*:on_update": "home.update_feed", "*:on_submit": "home.update_feed", +# "*:on_update": "webnotes.widgets.moduleview.update_count" } \ No newline at end of file diff --git a/startup/open_count.py b/startup/open_count.py new file mode 100644 index 0000000000..ad8adefcdd --- /dev/null +++ b/startup/open_count.py @@ -0,0 +1,26 @@ +# ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd +# GNU General Public Licnese. See "license.txt" + +from __future__ import unicode_literals +import webnotes + +queries = { + "Support Ticket": "select count(*) from `tabSupport Ticket` where status='Open'", + "Task": "select count(*) from `tabTask` where status='Open'", + "Lead": "select count(*) from `tabLead` where status='Open'", + "Opportunity": "docstatus", + "Quotation": "docstatus", + "Sales Order": "docstatus", + "Journal Voucher": "docstatus", + "Sales Invoice": "docstatus", + "Purchase Invoice": "docstatus", + "Leave Application": "docstatus", + "Expense Claim": "docstatus", + "Purchase Receipt": "docstatus", + "Delivery Note": "docstatus", + "Stock Entry": "docstatus", + "Purchase Request": "docstatus", + "Purchase Order": "docstatus", + "Production Order": "docstatus", + "Timesheet": "docstatus", +} \ No newline at end of file diff --git a/stock/page/stock_home/stock_home.html b/stock/page/stock_home/stock_home.html deleted file mode 100644 index d4dfd4cea5..0000000000 --- a/stock/page/stock_home/stock_home.html +++ /dev/null @@ -1,143 +0,0 @@ -
-
-
-
-
Stock Entry
-

Transfer stock from one warehouse to another

-
-
Delivery Note
-

Delivery (shipment) to customers

-
-
Purchase Receipt
-

Goods received from Suppliers

-
-
-
Item
-

Item Master

-
-
Serial No
-

Single unit of an Item

-
-
Batch
-

Batch of units of an Item

-
-
Warehouse
-

Warehouse is where items are stored

-
-
-
-

Reports

-
-
Stock Ledger -
-

Log of stock movements

-
-
- Stock Balance -
-

Inflow, outflow and balance of stock

-
-
- Stock Level -
-

Available and estimated qty of stock, as of now

-
-
-
- Stock Analytics -
-

Visual representation of stock trends

-
-
- Stock Ageing -
-

Analysis of slow moving stock

-
-
-
-
-
- -
-
diff --git a/stock/page/stock_home/stock_home.js b/stock/page/stock_home/stock_home.js index 97f5ec9236..db08398058 100644 --- a/stock/page/stock_home/stock_home.js +++ b/stock/page/stock_home/stock_home.js @@ -1,20 +1,206 @@ -// ERPNext - web based ERP (http://erpnext.com) -// Copyright (C) 2012 Web Notes Technologies Pvt Ltd -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd +// GNU General Public License. See "license.txt" + +wn.module_page["Stock"] = [ + { + title: wn._("Documents"), + icon: "icon-copy", + items: [ + { + label: wn._("Stock Entry"), + description: wn._("Transfer stock from one warehouse to another."), + doctype:"Stock Entry" + }, + { + label: wn._("Delivery Note"), + description: wn._("Delivery (shipment) to customers."), + doctype:"Delivery Note" + }, + { + label: wn._("Purchase Receipt"), + description: wn._("Goods received from Suppliers."), + doctype:"Purchase Receipt" + }, + ] + }, + { + title: wn._("Masters"), + icon: "icon-book", + items: [ + { + label: wn._("Item"), + description: wn._("All Products or Services."), + doctype:"Item" + }, + { + label: wn._("Serial No"), + description: wn._("Single unit of an Item."), + doctype:"Serial No" + }, + { + label: wn._("Batch"), + description: wn._("Batch (lot) of an Item."), + doctype:"Batch" + }, + { + label: wn._("Warehouse"), + description: wn._("Where items are stored."), + doctype:"Warehouse" + }, + ] + }, + { + title: wn._("Tools"), + icon: "icon-wrench", + items: [ + { + "doctype":"Stock Reconciliation", + "label": wn._("Stock Reconciliation"), + description: wn._("Upload stock balance via csv.") + }, + { + "doctype":"Installation Note", + "label": wn._("Installation Note"), + description: wn._("Installation record for a Serial No.") + }, + { + "label": wn._("Packing Slip"), + "doctype":"Packing Slip", + description: wn._("Split Delivery Note into packages.") + }, + { + "doctype":"Price List", + "label": wn._("Price List"), + "description": wn._("Multiple Item Prices") + }, + { + "doctype":"Quality Inspection", + "label": wn._("Quality Inspection"), + description: wn._("Incoming quality inspection.") + }, + { + "doctype":"Landed Cost Master", + "label":"Landed Cost Master", + description: wn._("Transportatoin cost distribution template.") + }, + { + "route":"#Form/Landed Cost Wizard/Landed Cost Wizard", + "label": wn._("Landed Cost Wizard"), + description: wn._("Distribute transport overhead across items."), + doctype: "Landed Cost Wizard" + }, + { + "route":"#Form/Stock UOM Replace Utility/Stock UOM Replace Utility", + "label": wn._("UOM Replace Utility"), + "doctype": "Stock UOM Replace Utility" + }, + { + "route":"#Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool", + "label": wn._("Sales and Purchase Return Tool"), + doctype: "Sales and Purchase Return Tool", + description: wn._("Manage sales or purchase returns") + }, + ] + }, + { + title: wn._("Setup"), + icon: "icon-cog", + items: [ + { + "route":"Sales Browser/Item Group", + "label": wn._("Item Group"), + "description": wn._("Item classification.") + }, + { + "doctype":"UOM", + "label": wn._("Unit of Measure") + " (UOM)", + "description": wn._("e.g. Kg, Unit, Nos, m") + }, + { + "doctype":"Brand", + "label": wn._("Brand"), + "description": wn._("Brand master.") + }, + { + "label": wn._("Warehouse Type"), + "doctype":"Warehouse Type", + "description": wn._("Types of warehouse") + } + ] + }, + { + title: wn._("Main Reports"), + right: true, + icon: "icon-table", + items: [ + { + "label":wn._("Stock Ledger"), + page: "stock-ledger" + }, + { + "label":wn._("Stock Balance"), + page: "stock-balance" + }, + { + "page":"stock-level", + "label": wn._("Stock Level") + }, + { + "page":"stock-ageing", + "label": wn._("Stock Ageing") + }, + ] + }, + { + title: wn._("Analytics"), + right: true, + icon: "icon-bar-chart", + items: [ + { + "label":wn._("Stock Analytics"), + page: "stock-analytics" + }, + ] + }, + { + title: wn._("Reports"), + right: true, + icon: "icon-list", + items: [ + { + "label":wn._("Stock Ledger"), + route: "Report2/Stock Ledger Entry/Stock Ledger", + doctype: "Stock Ledger Entry" + }, + { + "label":wn._("Ordered Items To Be Delivered"), + route: "query-report/Ordered Items To Be Delivered", + doctype: "Delivery Note" + }, + { + "label":wn._("Serial No Service Contract Expiry"), + route: "Report2/Serial No/Serial No Service Contract Expiry", + doctype: "Serial No" + }, + { + "label":wn._("Serial No Status"), + route: "Report2/Serial No/Serial No Status", + doctype: "Serial No" + }, + { + "label":wn._("Serial No Warranty Expiry"), + route: "Report2/Serial No/Serial No Warranty Expiry", + doctype: "Serial No" + }, + { + "label":wn._("Item-Wise Price List"), + route: "query-report/Item-Wise Price List", + doctype: "Item" + }, + ] + } +] pscript['onload_stock-home'] = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Stock'); - erpnext.module_page.setup_page('Stock', wrapper); + wn.views.moduleview.make(wrapper, "Stock"); } \ No newline at end of file diff --git a/support/page/support_home/support_home.html b/support/page/support_home/support_home.html deleted file mode 100644 index 59eff10aad..0000000000 --- a/support/page/support_home/support_home.html +++ /dev/null @@ -1,58 +0,0 @@ -
-
-
-
-
Support Ticket
-

Support queries from customers via email or website

-
-
Customer Issue
-

Customer Issue against a Serial No (warranty)

-
-
Maintenance Schedule
-

Plan for scheduled maintenance contracts

-
-
Maintenance Visit
-

Visit report for maintenance visit

-
-
Newsletter
-

Send Newsletters to your contacts

-
-
Communication
-

Communication Log

-
-
-
Serial No
-

Single unit of an Item

-
-
-
-
-
- Support Analytics -
-

Support Ticket trends and response.

-
-
-
-
-
-

Reports

-
-
-
-
-
-
Tools
-
- -
-
-
- -
-
-
\ No newline at end of file diff --git a/support/page/support_home/support_home.js b/support/page/support_home/support_home.js index 99b109fdf2..d397daa6ce 100644 --- a/support/page/support_home/support_home.js +++ b/support/page/support_home/support_home.js @@ -1,20 +1,79 @@ -// ERPNext - web based ERP (http://erpnext.com) -// Copyright (C) 2012 Web Notes Technologies Pvt Ltd -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd +// GNU General Public License. See "license.txt" + +wn.module_page["Support"] = [ + { + title: wn._("Documents"), + icon: "icon-copy", + items: [ + { + label: wn._("Support Ticket"), + description: wn._("Support queries from customers via email or website."), + doctype:"Support Ticket" + }, + { + label: wn._("Customer Issue"), + description: wn._("Customer Issue against a Serial No (warranty)."), + doctype:"Customer Issue" + }, + { + label: wn._("Maintenance Schedule"), + description: wn._("Plan for scheduled maintenance contracts."), + doctype:"Maintenance Schedule" + }, + { + label: wn._("Maintenance Visit"), + description: wn._("Visit report for maintenance call."), + doctype:"Maintenance Visit" + }, + { + label: wn._("Newsletter"), + description: wn._("Send Newsletters to your contacts, leads."), + doctype:"Newsletter" + }, + { + label: wn._("Communication"), + description: wn._("Communication log."), + doctype:"Communication" + }, + ] + }, + { + title: wn._("Masters"), + icon: "icon-book", + items: [ + { + label: wn._("Serial No"), + description: wn._("Single unit of an Item."), + doctype:"Serial No" + }, + ] + }, + { + title: wn._("Setup"), + icon: "icon-cog", + items: [ + { + "route":"Form/Email Settings/Email Settings", + "label":wn._("Email Settings"), + "description":wn._("Setup to pull emails from support email account"), + doctype: "Email Settings" + }, + ] + }, + { + title: wn._("Analytics"), + right: true, + icon: "icon-bar-chart", + items: [ + { + "label":wn._("Support Analytics"), + page: "support-analytics" + }, + ] + }, +] pscript['onload_support-home'] = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Support'); - erpnext.module_page.setup_page('Support', wrapper); -} \ No newline at end of file + wn.views.moduleview.make(wrapper, "Support"); +} diff --git a/website/doctype/style_settings/style_settings.txt b/website/doctype/style_settings/style_settings.txt index cd9d2563bf..a3e81eb455 100644 --- a/website/doctype/style_settings/style_settings.txt +++ b/website/doctype/style_settings/style_settings.txt @@ -2,23 +2,18 @@ { "owner": "Administrator", "docstatus": 0, - "creation": "2012-04-02 16:02:43", + "creation": "2012-07-03 13:30:57", "modified_by": "Administrator", - "modified": "2012-05-01 15:58:16" + "modified": "2013-01-08 12:00:51" }, { - "section_style": "Simple", - "allow_attach": 1, - "module": "Website", - "doctype": "DocType", - "description": "Set your background color, font and image (tiled)", "issingle": 1, + "allow_attach": 1, "name": "__common__", - "colour": "White:FFF", - "_last_update": "1330594969", - "show_in_menu": 0, + "doctype": "DocType", + "module": "Website", "max_attachments": 1, - "version": 1 + "description": "Set your background color, font and image (tiled)" }, { "name": "__common__", @@ -40,29 +35,17 @@ "name": "Style Settings", "doctype": "DocType" }, - { - "write": 1, - "create": 1, - "permlevel": 0, - "doctype": "DocPerm" - }, - { - "permlevel": 1, - "doctype": "DocPerm" - }, { "description": "If image is selected, color will be ignored (attach first)", - "colour": "White:FFF", "doctype": "DocField", "label": "Background Image", - "permlevel": 0, + "options": "attach_files:", "fieldname": "background_image", "fieldtype": "Select", - "options": "attach_files:" + "permlevel": 0 }, { "description": "Solid background color (default light gray)", - "colour": "White:FFF", "doctype": "DocField", "label": "Background Color", "fieldname": "background_color", @@ -70,33 +53,35 @@ "permlevel": 0 }, { - "width": "50%", + "print_width": "50%", "doctype": "DocField", + "width": "50%", + "fieldname": "cb0", "fieldtype": "Column Break", "permlevel": 0 }, { "doctype": "DocField", - "options": "\nHelvetica Neue\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nLato\nOpen Sans", + "label": "Font", + "options": "\nHelvetica Neue\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma", "fieldname": "font", "fieldtype": "Select", - "label": "Font", "permlevel": 0 }, { "doctype": "DocField", + "label": "Font Size", "options": "\n12px\n13px\n14px\n15px\n16px", "fieldname": "font_size", "fieldtype": "Select", - "label": "Font Size", "permlevel": 0 }, { "doctype": "DocField", + "label": "Heading Font", "options": "\nHelvetica Neue\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nLato\nOpen Sans", "fieldname": "heading_font", "fieldtype": "Select", - "label": "Heading Font", "permlevel": 0 }, { @@ -108,7 +93,6 @@ }, { "description": "add your own CSS (careful!)", - "colour": "White:FFF", "doctype": "DocField", "label": "Add CSS", "fieldname": "add_css", @@ -117,7 +101,6 @@ }, { "description": "Auto generated", - "colour": "White:FFF", "doctype": "DocField", "label": "Custom CSS", "fieldname": "custom_css", @@ -133,5 +116,19 @@ "fieldtype": "Text", "hidden": 1, "permlevel": 0 + }, + { + "create": 1, + "doctype": "DocPerm", + "write": 1, + "permlevel": 0 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "cancel": 0, + "permlevel": 1 } ] \ No newline at end of file diff --git a/website/page/website_home/website_home.html b/website/page/website_home/website_home.html deleted file mode 100644 index 0fde113765..0000000000 --- a/website/page/website_home/website_home.html +++ /dev/null @@ -1,47 +0,0 @@ -
-
-
-
-
Web Page
-

Static (content) web page.

-
-
Blog
-

Weblog (blog) entry.

-
-
Website Slideshow
-

Slideshows for adding in website pages.

-
-
-
Website Settings
-

Setup of top navigation bar, footer and logo.

-
-
Style Settings
-

Setup of fonts and background.

-
-
Product Settings
-

Settings for Product Catalog on the website.

-
-
About Us Settings
-

Settings for About Us Page.

-
-
Contact Us Settings
-

Settings for the Contact Us Page.

-
-
-
-
-
-
-
Advanced
-
- -
-
-
-
-
-
\ No newline at end of file diff --git a/website/page/website_home/website_home.js b/website/page/website_home/website_home.js index 15391ec434..c6b2253df1 100644 --- a/website/page/website_home/website_home.js +++ b/website/page/website_home/website_home.js @@ -1,20 +1,85 @@ -// ERPNext - web based ERP (http://erpnext.com) -// Copyright (C) 2012 Web Notes Technologies Pvt Ltd -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd +// GNU General Public License. See "license.txt" + +wn.module_page["Website"] = [ + { + title: wn._("Web Content"), + icon: "icon-copy", + items: [ + { + label: wn._("Web Page"), + description: wn._("Content web page."), + doctype:"Web Page" + }, + { + label: wn._("Blog"), + description: wn._("Blog entry."), + doctype:"Blog" + }, + { + label: wn._("Website Slideshow"), + description: wn._("Embed image slideshows in website pages."), + doctype:"Website Slideshow" + }, + ] + }, + { + title: wn._("Website Overall Settings"), + icon: "icon-wrench", + right: true, + items: [ + { + "route":"Form/Website Settings", + "label":wn._("Website Settings"), + "description":wn._("Setup of top navigation bar, footer and logo."), + doctype:"Website Settings" + }, + { + "route":"Form/Style Settings", + "label":wn._("Style Settings"), + "description":wn._("Setup of fonts and background."), + doctype:"Style Settings" + }, + ] + }, + { + title: wn._("Special Page Settings"), + icon: "icon-wrench", + items: [ + { + "route":"Form/Product Settings", + "label":wn._("Product Settings"), + "description":wn._("Settings for Product Catalog on the website."), + doctype:"Product Settings" + }, + { + "route":"Form/About Us Settings", + "label":wn._("About Us Settings"), + "description":wn._("Settings for About Us Page."), + doctype:"About Us Settings" + }, + { + "route":"Form/Contact Us Settings", + "label":wn._("Contact Us Settings"), + "description":wn._("Settings for Contact Us Page."), + doctype:"Contact Us Settings" + }, + ] + }, + { + title: wn._("Advanced Scripting"), + icon: "icon-wrench", + items: [ + { + "route":"Form/Website Script", + "label":wn._("Website Script"), + "description":wn._("Javascript to append to the head section of the page."), + doctype:"Website Script" + }, + ] + } +] pscript['onload_website-home'] = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Website'); - erpnext.module_page.setup_page('Website', wrapper); + wn.views.moduleview.make(wrapper, "Website"); } \ No newline at end of file From 978d4e87c989ead1e826a594008b7bae35cb19ef Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 9 Jan 2013 17:23:45 +0530 Subject: [PATCH 07/10] updated setup --- projects/page/projects/projects.txt | 19 +- setup/page/setup/setup.html | 128 ------------- setup/page/setup/setup.js | 202 ++++++++++++++++++--- stock/page/stock_balance/stock_balance.txt | 19 +- stock/page/stock_level/stock_level.txt | 19 +- 5 files changed, 229 insertions(+), 158 deletions(-) delete mode 100644 setup/page/setup/setup.html diff --git a/projects/page/projects/projects.txt b/projects/page/projects/projects.txt index 69f3afa6dd..170134e3a0 100644 --- a/projects/page/projects/projects.txt +++ b/projects/page/projects/projects.txt @@ -2,19 +2,30 @@ { "owner": "Administrator", "docstatus": 0, - "creation": "2010-12-14 10:23:31", + "creation": "2012-06-14 18:44:57", "modified_by": "Administrator", - "modified": "2010-12-30 14:43:47" + "modified": "2013-01-09 17:19:26" }, { "name": "__common__", + "doctype": "Page", "module": "Projects", "standard": "Yes", - "page_name": "Projects", - "doctype": "Page" + "page_name": "Projects" + }, + { + "name": "__common__", + "parent": "Projects", + "doctype": "Page Role", + "parenttype": "Page", + "role": "Projects User", + "parentfield": "roles" }, { "name": "Projects", "doctype": "Page" + }, + { + "doctype": "Page Role" } ] \ No newline at end of file diff --git a/setup/page/setup/setup.html b/setup/page/setup/setup.html deleted file mode 100644 index 33dd460d5e..0000000000 --- a/setup/page/setup/setup.html +++ /dev/null @@ -1,128 +0,0 @@ -
-
-
-
-

Company

-

- Companies
- List of companies (not customers / suppliers) -

-

- Fiscal Years
- Financial Years for books of accounts -

-

- Currencies
- Currency Master -

-
-
-

Users and Permissions

-

- Users
- Add/remove users, set roles, passwords etc -

-

- Permission Manager
- Set permissions on transactions / masters -

-

- User Properties
- Set default values for users (also used for permissions). -

-

- Workflow Manager
- Set workflow rules. -

-

- Amount based Authorization Rules
- Restrict submission rights based on amount -

-
-
-

Data

-

- Data Import Tool
- Import data from spreadsheet (csv) files -

-

- Global Defaults
- Set default values for entry -

-

- Recycle Bin
- Un-trash items -

-
-
-

Email and Notifications

-

- Email Settings
- Out going mail server and support ticket mailbox -

-

- Auto Notifications
- Automatic email sending to customers and suppliers -

-

- Email Digests
- Daily, weekly, monthly email Digests -

-

- SMS Setup
- Setup outgoing SMS via your bulk SMS provider -

-

- Send Bulk SMS
- Send bulk SMS to leads, customers, contacts -

-
-
-

Customize ERPNext

-

- Customize Forms
- Change entry properties (hide fields, make mandatory etc) -

-

- Custom Fields
- Add fields to forms -

-

- Custom Scripts
- Add custom code to forms -

-

- Disable Features
- Simplify entry forms by disabling features -

-

- Modules Setup
- Show, hide modules -

-

- Numbering Series
- Set multiple numbering series for transactions -

-
-
-

Branding and Printing

-

- Letter Heads
- Letter heads for print -

-

- Print Formats
- HTML print formats for quotes, invoices etc -

-

- Print Headings
- Add headers for standard print formats -

-

- Style Settings
- Change background fonts etc -

-
-
-
-
diff --git a/setup/page/setup/setup.js b/setup/page/setup/setup.js index a1b9f2df3f..a54b605629 100644 --- a/setup/page/setup/setup.js +++ b/setup/page/setup/setup.js @@ -1,27 +1,185 @@ -// ERPNext - web based ERP (http://erpnext.com) -// Copyright (C) 2012 Web Notes Technologies Pvt Ltd -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd +// GNU General Public License. See "license.txt" -pscript.onload_Setup = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Setup'); - wrapper.appframe.add_home_breadcrumb(); - wrapper.appframe.add_breadcrumb(wn.modules["Setup"].icon); - - erpnext.module_page.hide_links(wrapper); +wn.module_page["Setup"] = [ + { + title: wn._("Organization"), + icon: "icon-building", + items: [ + { + "label":wn._("Company"), + "doctype":"Company", + "description":wn._("List of companies (not customers / suppliers)") + }, + { + "doctype":"Fiscal Year", + "label": wn._("Fiscal Year"), + "description":wn._("Financial Years for books of accounts") + }, + { + "doctype":"Currency", + "label": wn._("Currency"), + "description": wn._("Currency Master") + }, + ] + }, + { + title: wn._("Users"), + icon: "icon-group", + right: true, + items: [ + { + "doctype":"Profile", + "label": wn._("Profile"), + "description": wn._("Add/remove users, set roles, passwords etc") + }, + { + "page":"permission-manager", + label: wn._("Permission Manager"), + "description": wn._("Set permissions on transactions / masters") + }, + { + "page":"user-properties", + label: wn._("User Properties"), + "description":wn._("Set default values for users (also used for permissions).") + }, + { + "doctype":"Workflow", + label:wn._("Workfow"), + "description":wn._("Set workflow rules.") + }, + { + "doctype":"Authorization Rule", + label:wn._("Authorization Rule"), + "description":wn._("Restrict submission rights based on amount") + }, + ] + }, + { + title: wn._("Data"), + icon: "icon-table", + items: [ + { + "page":"data-import-tool", + label: wn._("Data Import"), + "description":wn._("Import data from spreadsheet (csv) files") + }, + { + "route":"Form/Global Defaults", + doctype: "Global Defaults", + label: wn._("Global Defaults"), + "description":wn._("Set default values for entry"), + }, + { + "route":"Form/Naming Series/Naming Series", + doctype: "Naming Series", + label: wn._("Manage numbering series"), + "description":wn._("Set multiple numbering series for transactions") + }, + ] + }, + { + title: wn._("Branding and Printing"), + icon: "icon-printer", + right: true, + items: [ + { + "doctype":"Letter Head", + label:wn._("Letter Head"), + "description":wn._("Letter heads for print") + }, + { + "doctype":"Print Format", + label:wn._("Print Format"), + "description":wn._("HTML print formats for quotes, invoices etc") + }, + { + "doctype":"Print Heading", + label:wn._("Print Heading"), + "description":wn._("Add headers for standard print formats") + }, + { + "route":"Form/Style Settings/Style Settings", + doctype:wn._("Style Settings"), + label:wn._("Style Settings"), + "description":wn._("Change background fonts etc") + } + ] + }, + { + title: wn._("Email Settings"), + icon: "icon-envelope", + items: [ + { + "route":"Form/Email Settings/Email Settings", + doctype:"Email Settings", + label: wn._("Email Settings"), + "description":wn._("Out going mail server and support ticket mailbox") + }, + { + "route":"Form/Notification Control/Notification Control", + doctype:"Notification Control", + label: wn._("Notification Control"), + "description":wn._("Prompt email sending to customers and suppliers"), + }, + { + "doctype":"Email Digest", + label: wn._("Email Digest"), + "description":wn._("Daily, weekly, monthly email Digests") + }, + { + "route":"Form/SMS Settings/SMS Settings", + doctype:"SMS Settings", + label: wn._("SMS Settings"), + "description":wn._("Setup outgoing SMS via your bulk SMS provider") + }, + { + "route":"Form/SMS Center/SMS Center", + doctype:"SMS Center", + label: wn._("SMS Center"), + "description":wn._("Send bulk SMS to leads, customers, contacts") + }, + ] + }, + { + title: wn._("Customize"), + icon: "icon-wrench", + items: [ + { + "route":"Form/Customize Form/Customize Form", + doctype:"Customize Form", + label: wn._("Customize Form"), + "description":wn._("Change entry properties (hide fields, make mandatory etc)") + }, + { + "doctype":"Custom Field", + label: wn._("Custom Field"), + "description":wn._("Add fields to forms") + }, + { + "doctype":"Custom Script", + label: wn._("Custom Script"), + "description":wn._("Add custom code to forms") + }, + { + "route":"Form/Features Setup/Features Setup", + "description":wn._("Simplify entry forms by disabling features"), + doctype:"Features Setup", + label: wn._("Features Setup"), + }, + { + "page":"modules_setup", + label: wn._("Show / Hide Modules"), + "description":wn._("Show, hide modules") + }, + ] + }, +] + +pscript['onload_Setup'] = function(wrapper) { + wn.views.moduleview.make(wrapper, "Setup"); if(wn.boot.expires_on) { - $(wrapper).find(".layout-main") + $(wrapper).find(".main-section") .prepend("
Your ERPNext account will expire on " + wn.datetime.global_date_format(wn.boot.expires_on) + "
"); } diff --git a/stock/page/stock_balance/stock_balance.txt b/stock/page/stock_balance/stock_balance.txt index 0f8e7fa5e2..24fffc2065 100644 --- a/stock/page/stock_balance/stock_balance.txt +++ b/stock/page/stock_balance/stock_balance.txt @@ -2,9 +2,9 @@ { "owner": "Administrator", "docstatus": 0, - "creation": "2012-12-25 13:02:32", + "creation": "2012-12-27 18:57:47", "modified_by": "Administrator", - "modified": "2012-12-25 13:02:32" + "modified": "2013-01-09 17:16:51" }, { "name": "__common__", @@ -14,8 +14,23 @@ "standard": "Yes", "page_name": "stock-balance" }, + { + "name": "__common__", + "parent": "stock-balance", + "doctype": "Page Role", + "parenttype": "Page", + "parentfield": "roles" + }, { "name": "stock-balance", "doctype": "Page" + }, + { + "role": "Material Manager", + "doctype": "Page Role" + }, + { + "role": "Analytics", + "doctype": "Page Role" } ] \ No newline at end of file diff --git a/stock/page/stock_level/stock_level.txt b/stock/page/stock_level/stock_level.txt index 6bf5c41cec..4b567136df 100644 --- a/stock/page/stock_level/stock_level.txt +++ b/stock/page/stock_level/stock_level.txt @@ -2,9 +2,9 @@ { "owner": "Administrator", "docstatus": 0, - "creation": "2012-12-28 11:02:23", + "creation": "2012-12-31 10:52:14", "modified_by": "Administrator", - "modified": "2012-12-28 11:02:23" + "modified": "2013-01-09 17:16:57" }, { "name": "__common__", @@ -14,8 +14,23 @@ "standard": "Yes", "page_name": "stock-level" }, + { + "name": "__common__", + "parent": "stock-level", + "doctype": "Page Role", + "parenttype": "Page", + "parentfield": "roles" + }, { "name": "stock-level", "doctype": "Page" + }, + { + "role": "Material Manager", + "doctype": "Page Role" + }, + { + "role": "Analytics", + "doctype": "Page Role" } ] \ No newline at end of file From aecae587cee5e7de9289543aa717602e6dbd1d99 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 9 Jan 2013 19:03:20 +0530 Subject: [PATCH 08/10] workflow updates: update_field not editable & bug fix --- hr/doctype/expense_claim/expense_claim.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hr/doctype/expense_claim/expense_claim.js b/hr/doctype/expense_claim/expense_claim.js index b06398e179..72fe15cfa1 100644 --- a/hr/doctype/expense_claim/expense_claim.js +++ b/hr/doctype/expense_claim/expense_claim.js @@ -61,7 +61,8 @@ cur_frm.cscript.refresh = function(doc,cdt,cdn){ } else { cur_frm.set_intro("Expense Claim is pending approval. Only the Expense Approver can update status."); cur_frm.toggle_enable("approval_status", false); - if(!doc.__islocal) cur_frm.frm_head.appframe.buttons.Submit.toggle(false); + if(!doc.__islocal && cur_frm.frm_head.appframe.buttons.Submit) + cur_frm.frm_head.appframe.buttons.Submit.toggle(false); } } else { if(doc.approval_status=="Approved") { From 846678a1e4aa57c54328a6d66c894c47cc79e010 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 10 Jan 2013 12:25:25 +0530 Subject: [PATCH 09/10] added links to open count in module + other minor fixes --- .../bank_reconciliation.txt | 73 ++++++----------- accounts/page/accounts_home/accounts_home.js | 6 +- hr/page/hr_home/hr_home.js | 2 +- .../notification_control.txt | 80 +++++++++---------- startup/open_count.py | 38 ++++----- stock/page/stock_home/stock_home.js | 7 +- 6 files changed, 91 insertions(+), 115 deletions(-) diff --git a/accounts/doctype/bank_reconciliation/bank_reconciliation.txt b/accounts/doctype/bank_reconciliation/bank_reconciliation.txt index 9914b488dd..f04cd0a032 100644 --- a/accounts/doctype/bank_reconciliation/bank_reconciliation.txt +++ b/accounts/doctype/bank_reconciliation/bank_reconciliation.txt @@ -2,25 +2,19 @@ { "owner": "Administrator", "docstatus": 0, - "creation": "2012-03-27 14:35:40", + "creation": "2012-07-03 13:30:49", "modified_by": "Administrator", - "modified": "2012-03-27 14:35:40" + "modified": "2013-01-10 12:15:49" }, { - "section_style": "Simple", "allow_print": 1, "module": "Accounts", - "doctype": "DocType", - "server_code_error": " ", "read_only": 1, "allow_email": 1, "hide_heading": 1, "issingle": 1, "name": "__common__", - "colour": "White:FFF", - "_last_update": "1294312169", - "show_in_menu": 0, - "version": 12, + "doctype": "DocType", "hide_toolbar": 1, "allow_copy": 1 }, @@ -32,10 +26,13 @@ "parentfield": "fields" }, { + "amend": 0, "name": "__common__", "parent": "Bank Reconciliation", "read": 1, + "submit": 0, "doctype": "DocPerm", + "cancel": 0, "parenttype": "DocType", "parentfield": "permissions" }, @@ -43,44 +40,15 @@ "name": "Bank Reconciliation", "doctype": "DocType" }, - { - "amend": 0, - "create": 1, - "doctype": "DocPerm", - "submit": 0, - "write": 1, - "role": "Accounts User", - "cancel": 0, - "permlevel": 0 - }, - { - "role": "All", - "permlevel": 1, - "doctype": "DocPerm" - }, - { - "create": 1, - "doctype": "DocPerm", - "write": 1, - "role": "Accounts Manager", - "permlevel": 0 - }, - { - "doctype": "DocField", - "label": "Head HTML", - "fieldname": "head_html", - "fieldtype": "HTML", - "permlevel": 0 - }, { "description": "Select account head of the bank where cheque was deposited.", "doctype": "DocField", "label": "Bank Account", - "permlevel": 0, + "options": "Account", "fieldname": "bank_account", "fieldtype": "Link", "reqd": 1, - "options": "Account" + "permlevel": 0 }, { "doctype": "DocField", @@ -99,29 +67,27 @@ "permlevel": 0 }, { - "colour": "White:FFF", "doctype": "DocField", "label": "Get Non Reconciled Entries", - "permlevel": 0, + "options": "get_details", "fieldname": "get_non_reconciled_entries", "fieldtype": "Button", - "options": "get_details" + "permlevel": 0 }, { - "colour": "White:FFF", "doctype": "DocField", "label": "Entries", - "permlevel": 0, + "options": "Bank Reconciliation Detail", "fieldname": "entries", "fieldtype": "Table", - "options": "Bank Reconciliation Detail" + "permlevel": 0 }, { "doctype": "DocField", + "label": "Update Clearance Date", "options": "update_details", "fieldname": "update_clearance_date", "fieldtype": "Button", - "label": "Update Clearance Date", "permlevel": 0 }, { @@ -130,5 +96,18 @@ "fieldname": "total_amount", "fieldtype": "Currency", "permlevel": 1 + }, + { + "create": 1, + "doctype": "DocPerm", + "write": 1, + "role": "Accounts User", + "permlevel": 0 + }, + { + "create": 0, + "doctype": "DocPerm", + "role": "All", + "permlevel": 1 } ] \ No newline at end of file diff --git a/accounts/page/accounts_home/accounts_home.js b/accounts/page/accounts_home/accounts_home.js index d207fafa62..7e04ca970e 100644 --- a/accounts/page/accounts_home/accounts_home.js +++ b/accounts/page/accounts_home/accounts_home.js @@ -46,13 +46,13 @@ wn.module_page["Accounts"] = [ icon: "icon-wrench", items: [ { - "route":"#Form/Bank Reconciliation/Bank Reconciliation", + "route":"Form/Bank Reconciliation/Bank Reconciliation", "label": wn._("Bank Reconciliation"), "description": wn._("Update bank payment dates with journals."), doctype: "Bank Reconciliation" }, { - "route":"#Form/Payment to Invoice Matching Tool/Payment to Invoice Matching Tool", + "route":"Form/Payment to Invoice Matching Tool/Payment to Invoice Matching Tool", "label": wn._("Payment Reconciliation"), "description": wn._("Match non-linked Invoices and Payments."), doctype: "Payment to Invoice Matching Tool" @@ -64,7 +64,7 @@ wn.module_page["Accounts"] = [ description: "Close Balance Sheet and book Profit or Loss." }, { - "route":"#Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool", + "route":"Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool", "label": wn._("Sales and Purchase Return Tool"), description: wn._("Manage sales or purchase returns"), "doctype": "Sales and Purchase Return Tool" diff --git a/hr/page/hr_home/hr_home.js b/hr/page/hr_home/hr_home.js index 79b8afc6e6..c2c5cd9f88 100644 --- a/hr/page/hr_home/hr_home.js +++ b/hr/page/hr_home/hr_home.js @@ -87,7 +87,7 @@ wn.module_page["HR"] = [ doctype: "Salary Structure" }, { - "route":"#Form/Salary Manager/Salary Manager", + "route":"Form/Salary Manager/Salary Manager", "label":wn._("Process Payroll"), "description":wn._("Generate Salary Slips"), doctype: "Salary Manager" diff --git a/setup/doctype/notification_control/notification_control.txt b/setup/doctype/notification_control/notification_control.txt index 3a17fb5b85..be86a962ca 100644 --- a/setup/doctype/notification_control/notification_control.txt +++ b/setup/doctype/notification_control/notification_control.txt @@ -2,22 +2,18 @@ { "owner": "Administrator", "docstatus": 0, - "creation": "2012-07-03 13:30:56", + "creation": "2012-07-12 23:29:45", "modified_by": "Administrator", - "modified": "2012-07-12 16:20:36" + "modified": "2013-01-10 12:22:45" }, { - "section_style": "Simple", - "description": "Send automatic emails to Contacts on Submitting transactions.", - "allow_print": 1, - "module": "Setup", "allow_email": 1, "issingle": 1, + "description": "Send automatic emails to Contacts on Submitting transactions.", "name": "__common__", - "colour": "White:FFF", + "allow_print": 1, "doctype": "DocType", - "server_code_error": " ", - "version": 1, + "module": "Setup", "allow_copy": 1 }, { @@ -42,26 +38,14 @@ "doctype": "DocType" }, { - "write": 0, - "create": 0, - "role": "Guest", - "doctype": "DocPerm" - }, - { - "write": 1, - "create": 1, - "role": "System Manager", - "doctype": "DocPerm" - }, - { - "description": "When any of the checked transactions are \"Submitted\", an email is automatically sent to the associated \"Contact\" in that transaction, with the transaction as an attachment.", - "colour": "White:FFF", + "description": "When any of the checked transactions are \"Submitted\", an email pop-up automatically opened to send an email to the associated \"Contact\" in that transaction, with the transaction as an attachment. The user may or may not send the email.", "doctype": "DocField", - "label": "Send Email Automatically on Submission of", + "label": "Prompt for Email on Submission of", "fieldname": "send_autonotification_for", "fieldtype": "Section Break" }, { + "print_width": "50%", "doctype": "DocField", "label": "Sales", "width": "50%", @@ -70,29 +54,30 @@ }, { "doctype": "DocField", + "label": "Quotation", "fieldname": "quotation", - "fieldtype": "Check", - "label": "Quotation" + "fieldtype": "Check" }, { "doctype": "DocField", + "label": "Sales Order", "fieldname": "sales_order", - "fieldtype": "Check", - "label": "Sales Order" + "fieldtype": "Check" }, { "doctype": "DocField", + "label": "Delivery Note", "fieldname": "delivery_note", - "fieldtype": "Check", - "label": "Delivery Note" + "fieldtype": "Check" }, { "doctype": "DocField", + "label": "Sales Invoice", "fieldname": "sales_invoice", - "fieldtype": "Check", - "label": "Sales Invoice" + "fieldtype": "Check" }, { + "print_width": "50%", "doctype": "DocField", "label": "Purchase", "width": "50%", @@ -101,44 +86,41 @@ }, { "doctype": "DocField", + "label": "Purchase Order", "fieldname": "purchase_order", - "fieldtype": "Check", - "label": "Purchase Order" + "fieldtype": "Check" }, { "doctype": "DocField", + "label": "Purchase Receipt", "fieldname": "purchase_receipt", - "fieldtype": "Check", - "label": "Purchase Receipt" + "fieldtype": "Check" }, { "doctype": "DocField", + "label": "Expense Claim", "fieldname": "expense_claim", - "fieldtype": "Check", - "label": "Expense Claim" + "fieldtype": "Check" }, { "description": "Customize the introductory text that goes as a part of that email. Each transaction has a separate introductory text.", - "colour": "White:FFF", "doctype": "DocField", "label": "Customize the Notification", "fieldname": "customize_the_notification", "fieldtype": "Section Break" }, { - "colour": "White:FFF", "doctype": "DocField", "label": "Select Transaction", - "trigger": "Client", "fieldname": "select_transaction", "fieldtype": "Select", "options": "\nQuotation\nSales Order\nDelivery Note\nSales Invoice\nPurchase Order\nPurchase Receipt\nExpense Claim\nExpense Claim Approved\nExpense Claim Rejected" }, { "doctype": "DocField", + "label": "Custom Message", "fieldname": "custom_message", - "fieldtype": "Text Editor", - "label": "Custom Message" + "fieldtype": "Text Editor" }, { "doctype": "DocField", @@ -210,5 +192,17 @@ "fieldname": "expense_claim_rejected_message", "fieldtype": "Text", "hidden": 1 + }, + { + "create": 0, + "doctype": "DocPerm", + "write": 0, + "role": "Guest" + }, + { + "create": 1, + "doctype": "DocPerm", + "write": 1, + "role": "System Manager" } ] \ No newline at end of file diff --git a/startup/open_count.py b/startup/open_count.py index ad8adefcdd..e0767c318d 100644 --- a/startup/open_count.py +++ b/startup/open_count.py @@ -5,22 +5,24 @@ from __future__ import unicode_literals import webnotes queries = { - "Support Ticket": "select count(*) from `tabSupport Ticket` where status='Open'", - "Task": "select count(*) from `tabTask` where status='Open'", - "Lead": "select count(*) from `tabLead` where status='Open'", - "Opportunity": "docstatus", - "Quotation": "docstatus", - "Sales Order": "docstatus", - "Journal Voucher": "docstatus", - "Sales Invoice": "docstatus", - "Purchase Invoice": "docstatus", - "Leave Application": "docstatus", - "Expense Claim": "docstatus", - "Purchase Receipt": "docstatus", - "Delivery Note": "docstatus", - "Stock Entry": "docstatus", - "Purchase Request": "docstatus", - "Purchase Order": "docstatus", - "Production Order": "docstatus", - "Timesheet": "docstatus", + "Support Ticket": {"status":"Open"}, + "Customer Issue": {"status":"Open"}, + "Task": {"status":"Open"}, + "Lead": {"status":"Open"}, + "Opportunity": {"docstatus":0}, + "Quotation": {"docstatus":0}, + "Sales Order": {"docstatus":0}, + "Journal Voucher": {"docstatus":0}, + "Sales Invoice": {"docstatus":0}, + "Purchase Invoice": {"docstatus":0}, + "Leave Application": {"status":"Open"}, + "Expense Claim": {"approval_status":"Draft"}, + "Purchase Receipt": {"docstatus":0}, + "Delivery Note": {"docstatus":0}, + "Stock Entry": {"docstatus":0}, + "Purchase Request": {"docstatus":0}, + "Purchase Order": {"docstatus":0}, + "Production Order": {"docstatus":0}, + "BOM": {"docstatus":0}, + "Timesheet": {"docstatus":0}, } \ No newline at end of file diff --git a/stock/page/stock_home/stock_home.js b/stock/page/stock_home/stock_home.js index db08398058..7ea62de254 100644 --- a/stock/page/stock_home/stock_home.js +++ b/stock/page/stock_home/stock_home.js @@ -84,18 +84,19 @@ wn.module_page["Stock"] = [ description: wn._("Transportatoin cost distribution template.") }, { - "route":"#Form/Landed Cost Wizard/Landed Cost Wizard", + "route":"Form/Landed Cost Wizard/Landed Cost Wizard", "label": wn._("Landed Cost Wizard"), description: wn._("Distribute transport overhead across items."), doctype: "Landed Cost Wizard" }, { - "route":"#Form/Stock UOM Replace Utility/Stock UOM Replace Utility", + "route":"Form/Stock UOM Replace Utility/Stock UOM Replace Utility", "label": wn._("UOM Replace Utility"), + description: wn._("Change UOM for an Item."), "doctype": "Stock UOM Replace Utility" }, { - "route":"#Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool", + "route":"Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool", "label": wn._("Sales and Purchase Return Tool"), doctype: "Sales and Purchase Return Tool", description: wn._("Manage sales or purchase returns") From 9dbb761f19f79b6bc393e353eba0cc0165886323 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 10 Jan 2013 12:37:28 +0530 Subject: [PATCH 10/10] latest_upates --- home/page/latest_updates/latest_updates.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/home/page/latest_updates/latest_updates.js b/home/page/latest_updates/latest_updates.js index e8b30cf422..6bbfca1e1c 100644 --- a/home/page/latest_updates/latest_updates.js +++ b/home/page/latest_updates/latest_updates.js @@ -1,4 +1,7 @@ erpnext.updates = [ + ["10th January 2013", [ + "New module pages with open item count and multi-lingual." + ]], ["7th January 2013", [ "Language (backend): Integrated language libraries."]], ["4th January 2013", [