mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
Merge branch 'i18n' of git://github.com/bperretti/erpnext into bperretti-i18n
This commit is contained in:
@@ -77,7 +77,7 @@ cur_frm.cscript.make_address = function() {
|
||||
return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where customer='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc"
|
||||
},
|
||||
as_dict: 1,
|
||||
no_results_message: 'No addresses created',
|
||||
no_results_message: wn._('No addresses created'),
|
||||
render_row: cur_frm.cscript.render_address_row,
|
||||
});
|
||||
// note: render_address_row is defined in contact_control.js
|
||||
|
||||
@@ -24,8 +24,8 @@ erpnext.LeadController = wn.ui.form.Controller.extend({
|
||||
|
||||
if(in_list(user_roles,'System Manager')) {
|
||||
cur_frm.footer.help_area.innerHTML = '<hr>\
|
||||
<p><a href="#Form/Sales Email Settings">Sales Email Settings</a><br>\
|
||||
<span class="help">Automatically extract Leads from a mail box e.g. "sales@example.com"</span></p>';
|
||||
<p><a href="#Form/Sales Email Settings">'+wn._('Sales Email Settings')+'</a><br>\
|
||||
<span class="help">'+wn._('Automatically extract Leads from a mail box e.g.')+' "sales@example.com"</span></p>';
|
||||
}
|
||||
},
|
||||
|
||||
@@ -36,9 +36,9 @@ erpnext.LeadController = wn.ui.form.Controller.extend({
|
||||
|
||||
this.frm.__is_customer = this.frm.__is_customer || this.frm.doc.__is_customer;
|
||||
if(!this.frm.doc.__islocal && !this.frm.__is_customer) {
|
||||
this.frm.add_custom_button("Create Customer", this.create_customer);
|
||||
this.frm.add_custom_button("Create Opportunity", this.create_opportunity);
|
||||
this.frm.add_custom_button("Send SMS", this.frm.cscript.send_sms);
|
||||
this.frm.add_custom_button(wn._("Create Customer"), this.create_customer);
|
||||
this.frm.add_custom_button(wn._("Create Opportunity"), this.create_opportunity);
|
||||
this.frm.add_custom_button(wn._("Send SMS"), this.frm.cscript.send_sms);
|
||||
}
|
||||
|
||||
cur_frm.communication_view = new wn.views.CommunicationList({
|
||||
@@ -68,7 +68,7 @@ erpnext.LeadController = wn.ui.form.Controller.extend({
|
||||
order by is_primary_address, is_shipping_address desc'
|
||||
},
|
||||
as_dict: 1,
|
||||
no_results_message: 'No addresses created',
|
||||
no_results_message: wn._('No addresses created'),
|
||||
render_row: this.render_address_row,
|
||||
});
|
||||
// note: render_address_row is defined in contact_control.js
|
||||
|
||||
@@ -103,12 +103,19 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn){
|
||||
erpnext.hide_naming_series();
|
||||
|
||||
cur_frm.clear_custom_buttons();
|
||||
<<<<<<< HEAD
|
||||
if(doc.docstatus === 1 && doc.status!=="Opportunity Lost") {
|
||||
cur_frm.add_custom_button( wn._('Create Quotation'), cur_frm.cscript.create_quotation);
|
||||
cur_frm.add_custom_button(wn._('Opportunity Lost'), cur_frm.cscript['Declare Opportunity Lost']);
|
||||
cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms);
|
||||
=======
|
||||
if(doc.docstatus === 1 && doc.status!=="Lost") {
|
||||
cur_frm.add_custom_button('Create Quotation', cur_frm.cscript.create_quotation);
|
||||
if(doc.status!=="Quotation") {
|
||||
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);
|
||||
>>>>>>> f146e8b7f52a3e46e335c0fefd92c347717b370b
|
||||
}
|
||||
|
||||
cur_frm.toggle_display("contact_info", doc.customer || doc.lead);
|
||||
@@ -174,11 +181,11 @@ cur_frm.cscript.lead = function(doc, cdt, cdn) {
|
||||
|
||||
cur_frm.cscript['Declare Opportunity Lost'] = function(){
|
||||
var dialog = new wn.ui.Dialog({
|
||||
title: "Set as Lost",
|
||||
title: wn._("Set as Lost"),
|
||||
fields: [
|
||||
{"fieldtype": "Text", "label": "Reason for losing", "fieldname": "reason",
|
||||
{"fieldtype": "Text", "label": wn._("Reason for losing"), "fieldname": "reason",
|
||||
"reqd": 1 },
|
||||
{"fieldtype": "Button", "label": "Update", "fieldname": "update"},
|
||||
{"fieldtype": "Button", "label": wn._("Update"), "fieldname": "update"},
|
||||
]
|
||||
});
|
||||
|
||||
@@ -191,7 +198,7 @@ cur_frm.cscript['Declare Opportunity Lost'] = function(){
|
||||
args: args.reason,
|
||||
callback: function(r) {
|
||||
if(r.exc) {
|
||||
msgprint("There were errors.");
|
||||
msgprint(wn._("There were errors."));
|
||||
return;
|
||||
}
|
||||
dialog.hide();
|
||||
|
||||
@@ -25,12 +25,19 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
|
||||
refresh: function(doc, dt, dn) {
|
||||
this._super(doc, dt, dn);
|
||||
|
||||
<<<<<<< HEAD
|
||||
if(doc.docstatus == 1 && doc.status!=='Order Lost') {
|
||||
cur_frm.add_custom_button(wn._('Make Sales Order'), cur_frm.cscript['Make Sales Order']);
|
||||
if(doc.status!=="Order Confirmed") {
|
||||
cur_frm.add_custom_button(wn._('Set as Lost'), cur_frm.cscript['Declare Order Lost']);
|
||||
=======
|
||||
if(doc.docstatus == 1 && doc.status!=='Lost') {
|
||||
cur_frm.add_custom_button('Make Sales Order', cur_frm.cscript['Make Sales Order']);
|
||||
if(doc.status!=="Ordered") {
|
||||
cur_frm.add_custom_button('Set as Lost', cur_frm.cscript['Declare Order Lost']);
|
||||
>>>>>>> f146e8b7f52a3e46e335c0fefd92c347717b370b
|
||||
}
|
||||
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
|
||||
cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms);
|
||||
}
|
||||
|
||||
if (this.frm.doc.docstatus===0) {
|
||||
@@ -122,9 +129,9 @@ cur_frm.cscript['Declare Order Lost'] = function(){
|
||||
var dialog = new wn.ui.Dialog({
|
||||
title: "Set as Lost",
|
||||
fields: [
|
||||
{"fieldtype": "Text", "label": "Reason for losing", "fieldname": "reason",
|
||||
{"fieldtype": "Text", "label": wn._("Reason for losing"), "fieldname": "reason",
|
||||
"reqd": 1 },
|
||||
{"fieldtype": "Button", "label": "Update", "fieldname": "update"},
|
||||
{"fieldtype": "Button", "label": wn._("Update"), "fieldname": "update"},
|
||||
]
|
||||
});
|
||||
|
||||
@@ -137,7 +144,7 @@ cur_frm.cscript['Declare Order Lost'] = function(){
|
||||
args: args.reason,
|
||||
callback: function(r) {
|
||||
if(r.exc) {
|
||||
msgprint("There were errors.");
|
||||
msgprint(wn._("There were errors."));
|
||||
return;
|
||||
}
|
||||
dialog.hide();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
cur_frm.toggle_enable('new_item_code', doc.__islocal);
|
||||
if(!doc.__islocal) {
|
||||
cur_frm.add_custom_button("Check for Duplicates", function() {
|
||||
cur_frm.add_custom_button(wn._("Check for Duplicates"), function() {
|
||||
return cur_frm.call_server('check_duplicate', 1)
|
||||
}, 'icon-search')
|
||||
}
|
||||
@@ -15,8 +15,8 @@ cur_frm.fields_dict.new_item_code.get_query = function() {
|
||||
query: "selling.doctype.sales_bom.sales_bom.get_new_item_code"
|
||||
}
|
||||
}
|
||||
cur_frm.fields_dict.new_item_code.query_description = 'Select Item where "Is Stock Item" is "No" \
|
||||
and "Is Sales Item" is "Yes" and there is no other Sales BOM';
|
||||
cur_frm.fields_dict.new_item_code.query_description = wn._('Select Item where "Is Stock Item" is "No"')+
|
||||
wn._('and "Is Sales Item" is "Yes" and there is no other Sales BOM');
|
||||
|
||||
cur_frm.cscript.item_code = function(doc, dt, dn) {
|
||||
var d = locals[dt][dn];
|
||||
|
||||
Reference in New Issue
Block a user