Merge pull request #16273 from surajshetty3416/general-ui-fixes

General UI fixes and changes
This commit is contained in:
Nabin Hait 2018-12-31 11:58:43 +05:30 committed by GitHub
commit ec86796d1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
51 changed files with 218 additions and 169 deletions

View File

@ -61,13 +61,13 @@ frappe.treeview_settings["Account"] = {
frappe.set_route('List', 'Period Closing Voucher', {company: get_company()}); frappe.set_route('List', 'Period Closing Voucher', {company: get_company()});
}, __('View')); }, __('View'));
// make
treeview.page.add_inner_button(__("Journal Entry"), function() { treeview.page.add_inner_button(__("Journal Entry"), function() {
frappe.new_doc('Journal Entry', {company: get_company()}); frappe.new_doc('Journal Entry', {company: get_company()});
}, __('Make')); }, __('Create'));
treeview.page.add_inner_button(__("New Company"), function() { treeview.page.add_inner_button(__("New Company"), function() {
frappe.new_doc('Company'); frappe.new_doc('Company');
}, __('Make')); }, __('Create'));
// financial statements // financial statements
for (let report of ['Trial Balance', 'General Ledger', 'Balance Sheet', for (let report of ['Trial Balance', 'General Ledger', 'Balance Sheet',

View File

@ -21,7 +21,7 @@ frappe.ui.form.on('Exchange Rate Revaluation', {
refresh: function(frm) { refresh: function(frm) {
if(frm.doc.docstatus==1) { if(frm.doc.docstatus==1) {
frm.add_custom_button(__('Make Journal Entry'), function() { frm.add_custom_button(__('Create Journal Entry'), function() {
return frm.events.make_jv(frm); return frm.events.make_jv(frm);
}); });
} }

View File

@ -40,7 +40,7 @@ frappe.ui.form.on("Journal Entry", {
erpnext.journal_entry.toggle_fields_based_on_currency(frm); erpnext.journal_entry.toggle_fields_based_on_currency(frm);
if ((frm.doc.voucher_type == "Inter Company Journal Entry") && (frm.doc.docstatus == 1) && (!frm.doc.inter_company_journal_entry_reference)) { if ((frm.doc.voucher_type == "Inter Company Journal Entry") && (frm.doc.docstatus == 1) && (!frm.doc.inter_company_journal_entry_reference)) {
frm.add_custom_button(__("Make Inter Company Journal Entry"), frm.add_custom_button(__("Create Inter Company Journal Entry"),
function() { function() {
frm.trigger("make_inter_company_journal_entry"); frm.trigger("make_inter_company_journal_entry");
} }
@ -68,7 +68,7 @@ frappe.ui.form.on("Journal Entry", {
} }
], ],
}); });
d.set_primary_action(__("Make"), function() { d.set_primary_action(__('Create'), function() {
d.hide(); d.hide();
var args = d.get_values(); var args = d.get_values();
frappe.call({ frappe.call({

View File

@ -15,7 +15,7 @@ frappe.ui.form.on('Opening Invoice Creation Tool', {
refresh: function(frm) { refresh: function(frm) {
frm.disable_save(); frm.disable_save();
frm.trigger("make_dashboard"); frm.trigger("make_dashboard");
frm.page.set_primary_action(__("Make Invoices"), () => { frm.page.set_primary_action(__('Create Invoices'), () => {
let btn_primary = frm.page.btn_primary.get(0); let btn_primary = frm.page.btn_primary.get(0);
return frm.call({ return frm.call({
doc: frm.doc, doc: frm.doc,

View File

@ -11,9 +11,9 @@ frappe.ui.form.on('Payment Order', {
// payment Entry // payment Entry
if (frm.doc.docstatus==1) { if (frm.doc.docstatus==1) {
frm.add_custom_button(__('Make Payment Entries'), frm.add_custom_button(__('Create Payment Entries'),
function() { function() {
frm.trigger("make_payment_records") frm.trigger("make_payment_records");
}); });
} }
}, },

View File

@ -34,7 +34,7 @@ frappe.ui.form.on("Payment Request", "refresh", function(frm) {
} }
if(!frm.doc.payment_gateway_account && frm.doc.status == "Initiated") { if(!frm.doc.payment_gateway_account && frm.doc.status == "Initiated") {
frm.add_custom_button(__('Make Payment Entry'), function(){ frm.add_custom_button(__('Create Payment Entry'), function(){
frappe.call({ frappe.call({
method: "erpnext.accounts.doctype.payment_request.payment_request.make_payment_entry", method: "erpnext.accounts.doctype.payment_request.payment_request.make_payment_entry",
args: {"docname": frm.doc.name}, args: {"docname": frm.doc.name},

View File

@ -46,40 +46,40 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
this.frm.add_custom_button( this.frm.add_custom_button(
__('Unblock Invoice'), __('Unblock Invoice'),
function() {me.unblock_invoice()}, function() {me.unblock_invoice()},
__('Make') __('Create')
); );
} else if (!doc.on_hold) { } else if (!doc.on_hold) {
this.frm.add_custom_button( this.frm.add_custom_button(
__('Block Invoice'), __('Block Invoice'),
function() {me.block_invoice()}, function() {me.block_invoice()},
__('Make') __('Create')
); );
} }
} }
if(doc.docstatus == 1 && doc.outstanding_amount != 0 if(doc.docstatus == 1 && doc.outstanding_amount != 0
&& !(doc.is_return && doc.return_against)) { && !(doc.is_return && doc.return_against)) {
this.frm.add_custom_button(__('Payment'), this.make_payment_entry, __("Make")); this.frm.add_custom_button(__('Payment'), this.make_payment_entry, __('Create'));
cur_frm.page.set_inner_btn_group_as_primary(__("Make")); cur_frm.page.set_inner_btn_group_as_primary(__('Create'));
} }
if(!doc.is_return && doc.docstatus==1) { if(!doc.is_return && doc.docstatus==1) {
if(doc.outstanding_amount >= 0 || Math.abs(flt(doc.outstanding_amount)) < flt(doc.grand_total)) { if(doc.outstanding_amount >= 0 || Math.abs(flt(doc.outstanding_amount)) < flt(doc.grand_total)) {
cur_frm.add_custom_button(__('Return / Debit Note'), cur_frm.add_custom_button(__('Return / Debit Note'),
this.make_debit_note, __("Make")); this.make_debit_note, __('Create'));
} }
if(!doc.auto_repeat) { if(!doc.auto_repeat) {
cur_frm.add_custom_button(__('Subscription'), function() { cur_frm.add_custom_button(__('Subscription'), function() {
erpnext.utils.make_subscription(doc.doctype, doc.name) erpnext.utils.make_subscription(doc.doctype, doc.name)
}, __("Make")) }, __('Create'))
} }
} }
if (doc.outstanding_amount > 0 && !cint(doc.is_return)) { if (doc.outstanding_amount > 0 && !cint(doc.is_return)) {
cur_frm.add_custom_button(__('Payment Request'), function() { cur_frm.add_custom_button(__('Payment Request'), function() {
me.make_payment_request() me.make_payment_request()
}, __("Make")); }, __('Create'));
} }
if(doc.docstatus===0) { if(doc.docstatus===0) {
@ -128,7 +128,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
if (internal == 1 && disabled == 0) { if (internal == 1 && disabled == 0) {
me.frm.add_custom_button("Inter Company Invoice", function() { me.frm.add_custom_button("Inter Company Invoice", function() {
me.make_inter_company_invoice(me.frm); me.make_inter_company_invoice(me.frm);
}, __("Make")); }, __('Create'));
} }
}); });
} }

View File

@ -51,8 +51,8 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
if (doc.docstatus == 1 && doc.outstanding_amount!=0 if (doc.docstatus == 1 && doc.outstanding_amount!=0
&& !(cint(doc.is_return) && doc.return_against)) { && !(cint(doc.is_return) && doc.return_against)) {
cur_frm.add_custom_button(__('Payment'), cur_frm.add_custom_button(__('Payment'),
this.make_payment_entry, __("Make")); this.make_payment_entry, __('Create'));
cur_frm.page.set_inner_btn_group_as_primary(__("Make")); cur_frm.page.set_inner_btn_group_as_primary(__('Create'));
} }
if(doc.docstatus==1 && !doc.is_return) { if(doc.docstatus==1 && !doc.is_return) {
@ -65,8 +65,8 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
if(doc.outstanding_amount >= 0 || Math.abs(flt(doc.outstanding_amount)) < flt(doc.grand_total)) { if(doc.outstanding_amount >= 0 || Math.abs(flt(doc.outstanding_amount)) < flt(doc.grand_total)) {
cur_frm.add_custom_button(__('Return / Credit Note'), cur_frm.add_custom_button(__('Return / Credit Note'),
this.make_sales_return, __("Make")); this.make_sales_return, __('Create'));
cur_frm.page.set_inner_btn_group_as_primary(__("Make")); cur_frm.page.set_inner_btn_group_as_primary(__('Create'));
} }
if(cint(doc.update_stock)!=1) { if(cint(doc.update_stock)!=1) {
@ -79,20 +79,20 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
if(!from_delivery_note && !is_delivered_by_supplier) { if(!from_delivery_note && !is_delivered_by_supplier) {
cur_frm.add_custom_button(__('Delivery'), cur_frm.add_custom_button(__('Delivery'),
cur_frm.cscript['Make Delivery Note'], __("Make")); cur_frm.cscript['Make Delivery Note'], __('Create'));
} }
} }
if (doc.outstanding_amount>0 && !cint(doc.is_return)) { if (doc.outstanding_amount>0 && !cint(doc.is_return)) {
cur_frm.add_custom_button(__('Payment Request'), function() { cur_frm.add_custom_button(__('Payment Request'), function() {
me.make_payment_request(); me.make_payment_request();
}, __("Make")); }, __('Create'));
} }
if(!doc.auto_repeat) { if(!doc.auto_repeat) {
cur_frm.add_custom_button(__('Subscription'), function() { cur_frm.add_custom_button(__('Subscription'), function() {
erpnext.utils.make_subscription(doc.doctype, doc.name) erpnext.utils.make_subscription(doc.doctype, doc.name)
}, __("Make")) }, __('Create'))
} }
} }
@ -112,7 +112,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
if (internal == 1 && disabled == 0) { if (internal == 1 && disabled == 0) {
me.frm.add_custom_button("Inter Company Invoice", function() { me.frm.add_custom_button("Inter Company Invoice", function() {
me.make_inter_company_invoice(); me.make_inter_company_invoice();
}, __("Make")); }, __('Create'));
} }
}); });
} }

View File

@ -17,7 +17,7 @@ frappe.ui.form.on('Share Transfer', {
}; };
}); });
if (frm.doc.docstatus == 1) { if (frm.doc.docstatus == 1) {
frm.add_custom_button(__('Make Journal Entry'), function () { frm.add_custom_button(__('Create Journal Entry'), function () {
erpnext.share_transfer.make_jv(frm); erpnext.share_transfer.make_jv(frm);
}); });
} }

View File

@ -81,26 +81,26 @@ frappe.ui.form.on('Asset', {
if (frm.doc.status=='Submitted' && !frm.doc.is_existing_asset && !frm.doc.purchase_invoice) { if (frm.doc.status=='Submitted' && !frm.doc.is_existing_asset && !frm.doc.purchase_invoice) {
frm.add_custom_button(__("Purchase Invoice"), function() { frm.add_custom_button(__("Purchase Invoice"), function() {
frm.trigger("make_purchase_invoice"); frm.trigger("make_purchase_invoice");
}, __("Make")); }, __('Create'));
} }
if (frm.doc.maintenance_required && !frm.doc.maintenance_schedule) { if (frm.doc.maintenance_required && !frm.doc.maintenance_schedule) {
frm.add_custom_button(__("Asset Maintenance"), function() { frm.add_custom_button(__("Asset Maintenance"), function() {
frm.trigger("create_asset_maintenance"); frm.trigger("create_asset_maintenance");
}, __("Make")); }, __('Create'));
} }
if (frm.doc.status != 'Fully Depreciated') { if (frm.doc.status != 'Fully Depreciated') {
frm.add_custom_button(__("Asset Value Adjustment"), function() { frm.add_custom_button(__("Asset Value Adjustment"), function() {
frm.trigger("create_asset_adjustment"); frm.trigger("create_asset_adjustment");
}, __("Make")); }, __('Create'));
} }
if (!frm.doc.calculate_depreciation) { if (!frm.doc.calculate_depreciation) {
frm.add_custom_button(__("Depreciation Entry"), function() { frm.add_custom_button(__("Depreciation Entry"), function() {
frm.trigger("make_journal_entry"); frm.trigger("make_journal_entry");
}, __("Make")); }, __('Create'));
} }
frm.page.set_inner_btn_group_as_primary(__("Make")); frm.page.set_inner_btn_group_as_primary(__('Create'));
frm.trigger("setup_chart"); frm.trigger("setup_chart");
} }

View File

@ -120,7 +120,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
if(doc.docstatus == 1 && doc.status != "Closed") { if(doc.docstatus == 1 && doc.status != "Closed") {
if(flt(doc.per_received, 2) < 100 && allow_receipt) { if(flt(doc.per_received, 2) < 100 && allow_receipt) {
cur_frm.add_custom_button(__('Receipt'), this.make_purchase_receipt, __("Make")); cur_frm.add_custom_button(__('Receipt'), this.make_purchase_receipt, __('Create'));
if(doc.is_subcontracted==="Yes") { if(doc.is_subcontracted==="Yes") {
cur_frm.add_custom_button(__('Material to Supplier'), cur_frm.add_custom_button(__('Material to Supplier'),
@ -130,24 +130,24 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
if(flt(doc.per_billed, 2) < 100) if(flt(doc.per_billed, 2) < 100)
cur_frm.add_custom_button(__('Invoice'), cur_frm.add_custom_button(__('Invoice'),
this.make_purchase_invoice, __("Make")); this.make_purchase_invoice, __('Create'));
if(flt(doc.per_billed)==0 && doc.status != "Delivered") { if(flt(doc.per_billed)==0 && doc.status != "Delivered") {
cur_frm.add_custom_button(__('Payment'), cur_frm.cscript.make_payment_entry, __("Make")); cur_frm.add_custom_button(__('Payment'), cur_frm.cscript.make_payment_entry, __('Create'));
} }
if(!doc.auto_repeat) { if(!doc.auto_repeat) {
cur_frm.add_custom_button(__('Subscription'), function() { cur_frm.add_custom_button(__('Subscription'), function() {
erpnext.utils.make_subscription(doc.doctype, doc.name) erpnext.utils.make_subscription(doc.doctype, doc.name)
}, __("Make")) }, __('Create'))
} }
if(flt(doc.per_billed)==0) { if(flt(doc.per_billed)==0) {
this.frm.add_custom_button(__('Payment Request'), this.frm.add_custom_button(__('Payment Request'),
function() { me.make_payment_request() }, __("Make")); function() { me.make_payment_request() }, __('Create'));
} }
cur_frm.page.set_inner_btn_group_as_primary(__("Make")); cur_frm.page.set_inner_btn_group_as_primary(__('Create'));
} }
}, },

View File

@ -31,7 +31,7 @@ frappe.ui.form.on("Request for Quotation",{
refresh: function(frm, cdt, cdn) { refresh: function(frm, cdt, cdn) {
if (frm.doc.docstatus === 1) { if (frm.doc.docstatus === 1) {
frm.add_custom_button(__("Make"), frm.add_custom_button(__('Create'),
function(){ frm.trigger("make_suppplier_quotation") }, __("Supplier Quotation")); function(){ frm.trigger("make_suppplier_quotation") }, __("Supplier Quotation"));
frm.add_custom_button(__("View"), frm.add_custom_button(__("View"),
@ -147,7 +147,7 @@ frappe.ui.form.on("Request for Quotation",{
"fieldname": "supplier", "fieldname": "supplier",
"options": doc.suppliers.map(d => d.supplier), "options": doc.suppliers.map(d => d.supplier),
"reqd": 1 }, "reqd": 1 },
{ "fieldtype": "Button", "label": __("Make Supplier Quotation"), { "fieldtype": "Button", "label": __('Create Supplier Quotation'),
"fieldname": "make_supplier_quotation", "cssClass": "btn-primary" }, "fieldname": "make_supplier_quotation", "cssClass": "btn-primary" },
] ]
}); });

View File

@ -47,11 +47,11 @@ frappe.ui.form.on("Supplier", {
frm.add_custom_button(__('Bank Account'), function () { frm.add_custom_button(__('Bank Account'), function () {
erpnext.utils.make_bank_account(frm.doc.doctype, frm.doc.name); erpnext.utils.make_bank_account(frm.doc.doctype, frm.doc.name);
}, __("Make")); }, __('Create'));
frm.add_custom_button(__('Pricing Rule'), function () { frm.add_custom_button(__('Pricing Rule'), function () {
erpnext.utils.make_pricing_rule(frm.doc.doctype, frm.doc.name); erpnext.utils.make_pricing_rule(frm.doc.doctype, frm.doc.name);
}, __("Make")); }, __('Create'));
// indicators // indicators
erpnext.utils.set_party_dashboard_indicators(frm); erpnext.utils.set_party_dashboard_indicators(frm);

View File

@ -18,15 +18,15 @@ erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.ext
this._super(); this._super();
if (this.frm.doc.docstatus === 1) { if (this.frm.doc.docstatus === 1) {
cur_frm.add_custom_button(__("Purchase Order"), this.make_purchase_order, cur_frm.add_custom_button(__("Purchase Order"), this.make_purchase_order,
__("Make")); __('Create'));
cur_frm.page.set_inner_btn_group_as_primary(__("Make")); cur_frm.page.set_inner_btn_group_as_primary(__('Create'));
cur_frm.add_custom_button(__("Quotation"), this.make_quotation, cur_frm.add_custom_button(__("Quotation"), this.make_quotation,
__("Make")); __('Create'));
if(!this.frm.doc.auto_repeat) { if(!this.frm.doc.auto_repeat) {
cur_frm.add_custom_button(__('Subscription'), function() { cur_frm.add_custom_button(__('Subscription'), function() {
erpnext.utils.make_subscription(me.frm.doc.doctype, me.frm.doc.name) erpnext.utils.make_subscription(me.frm.doc.doctype, me.frm.doc.name)
}, __("Make")) }, __('Create'))
} }
} }
else if (this.frm.doc.docstatus===0) { else if (this.frm.doc.docstatus===0) {

View File

@ -242,7 +242,7 @@ def get_data():
{ {
"type": "doctype", "type": "doctype",
"name": "Opening Invoice Creation Tool", "name": "Opening Invoice Creation Tool",
"description": _("Make Opening Sales and Purchase Invoices") "description": _("Create Opening Sales and Purchase Invoices")
}, },
] ]
}, },

View File

@ -38,12 +38,10 @@ def get_data():
"link": "List/Employee" "link": "List/Employee"
}, },
{ {
"module_name": "Project", "module_name": "Projects",
"_doctype": "Project",
"color": "#8e44ad", "color": "#8e44ad",
"icon": "octicon octicon-rocket", "icon": "octicon octicon-rocket",
"type": "link", "type": "module",
"link": "List/Project"
}, },
{ {
"module_name": "Issue", "module_name": "Issue",
@ -71,6 +69,7 @@ def get_data():
# old # old
{ {
"label": _("Accounting"),
"module_name": "Accounts", "module_name": "Accounts",
"color": "#3498db", "color": "#3498db",
"icon": "octicon octicon-repo", "icon": "octicon octicon-repo",
@ -151,12 +150,12 @@ def get_data():
"hidden": 1 "hidden": 1
}, },
{ {
"module_name": "Learn", "module_name": "Help",
"color": "#FF888B", "color": "#FF888B",
"icon": "octicon octicon-device-camera-video", "icon": "octicon octicon-device-camera-video",
"type": "module", "type": "module",
"is_help": True, "is_help": True,
"label": _("Learn"), "label": _("Help"),
"hidden": 1 "hidden": 1
}, },
{ {

View File

@ -70,7 +70,7 @@ def get_data():
] ]
}, },
{ {
"label": _("Accounts"), "label": _("Accounting"),
"items": [ "items": [
{ {
"type": "help", "type": "help",

View File

@ -109,7 +109,7 @@ def get_data():
] ]
for module, label, icon in ( for module, label, icon in (
("accounts", _("Accounts"), "fa fa-money"), ("accounts", _("Accounting"), "fa fa-money"),
("stock", _("Stock"), "fa fa-truck"), ("stock", _("Stock"), "fa fa-truck"),
("selling", _("Selling"), "fa fa-tag"), ("selling", _("Selling"), "fa fa-tag"),
("buying", _("Buying"), "fa fa-shopping-cart"), ("buying", _("Buying"), "fa fa-shopping-cart"),

View File

@ -30,9 +30,9 @@ erpnext.LeadController = frappe.ui.form.Controller.extend({
frappe.dynamic_link = {doc: doc, fieldname: 'name', doctype: 'Lead'} frappe.dynamic_link = {doc: doc, fieldname: 'name', doctype: 'Lead'}
if(!doc.__islocal && doc.__onload && !doc.__onload.is_customer) { if(!doc.__islocal && doc.__onload && !doc.__onload.is_customer) {
this.frm.add_custom_button(__("Customer"), this.create_customer, __("Make")); this.frm.add_custom_button(__("Customer"), this.create_customer, __('Create'));
this.frm.add_custom_button(__("Opportunity"), this.create_opportunity, __("Make")); this.frm.add_custom_button(__("Opportunity"), this.create_opportunity, __('Create'));
this.frm.add_custom_button(__("Quotation"), this.make_quotation, __("Make")); this.frm.add_custom_button(__("Quotation"), this.make_quotation, __('Create'));
} }
if(!this.frm.doc.__islocal) { if(!this.frm.doc.__islocal) {

View File

@ -47,11 +47,11 @@ frappe.ui.form.on("Opportunity", {
frm.add_custom_button(__('Supplier Quotation'), frm.add_custom_button(__('Supplier Quotation'),
function() { function() {
frm.trigger("make_supplier_quotation") frm.trigger("make_supplier_quotation")
}, __("Make")); }, __('Create'));
} }
frm.add_custom_button(__('Quotation'), frm.add_custom_button(__('Quotation'),
cur_frm.cscript.create_quotation, __("Make")); cur_frm.cscript.create_quotation, __('Create'));
if(doc.status!=="Quotation") { if(doc.status!=="Quotation") {
frm.add_custom_button(__('Lost'), frm.add_custom_button(__('Lost'),

View File

@ -31,7 +31,7 @@ frappe.ui.form.on('Fee Structure', {
refresh: function(frm) { refresh: function(frm) {
if(frm.doc.docstatus === 1) { if(frm.doc.docstatus === 1) {
frm.add_custom_button(__("Make Fee Schedule"), function() { frm.add_custom_button(__('Create Fee Schedule'), function() {
frm.events.make_fee_schedule(frm); frm.events.make_fee_schedule(frm);
}); });
} }

View File

@ -73,14 +73,14 @@ frappe.ui.form.on("Fees", {
if(frm.doc.docstatus===1 && frm.doc.outstanding_amount>0) { if(frm.doc.docstatus===1 && frm.doc.outstanding_amount>0) {
frm.add_custom_button(__("Payment Request"), function() { frm.add_custom_button(__("Payment Request"), function() {
frm.events.make_payment_request(frm); frm.events.make_payment_request(frm);
}, __("Make")); }, __('Create'));
frm.page.set_inner_btn_group_as_primary(__("Make")); frm.page.set_inner_btn_group_as_primary(__('Create'));
} }
if(frm.doc.docstatus===1 && frm.doc.outstanding_amount!=0) { if(frm.doc.docstatus===1 && frm.doc.outstanding_amount!=0) {
frm.add_custom_button(__("Payment"), function() { frm.add_custom_button(__("Payment"), function() {
frm.events.make_payment_entry(frm); frm.events.make_payment_entry(frm);
}, __("Make")); }, __('Create'));
frm.page.set_inner_btn_group_as_primary(__("Make")); frm.page.set_inner_btn_group_as_primary(__('Create'));
} }
}, },

View File

@ -4,7 +4,7 @@
frappe.ui.form.on('Hotel Room Reservation', { frappe.ui.form.on('Hotel Room Reservation', {
refresh: function(frm) { refresh: function(frm) {
if(frm.doc.docstatus == 1){ if(frm.doc.docstatus == 1){
frm.add_custom_button(__("Make Invoice"), ()=> { frm.add_custom_button(__('Create Invoice'), ()=> {
frm.trigger("make_invoice"); frm.trigger("make_invoice");
}); });
} }

View File

@ -31,7 +31,7 @@ frappe.ui.form.on('Employee Advance', {
&& (flt(frm.doc.paid_amount) < flt(frm.doc.advance_amount)) && (flt(frm.doc.paid_amount) < flt(frm.doc.advance_amount))
&& frappe.model.can_create("Payment Entry")) { && frappe.model.can_create("Payment Entry")) {
frm.add_custom_button(__('Payment'), frm.add_custom_button(__('Payment'),
function() { frm.events.make_payment_entry(frm); }, __("Make")); function() { frm.events.make_payment_entry(frm); }, __('Create'));
} }
else if ( else if (
frm.doc.docstatus === 1 frm.doc.docstatus === 1
@ -43,7 +43,7 @@ frappe.ui.form.on('Employee Advance', {
function() { function() {
frm.events.make_expense_claim(frm); frm.events.make_expense_claim(frm);
}, },
__("Make") __('Create')
); );
} }
}, },

View File

@ -46,7 +46,7 @@ frappe.ui.form.on('Employee Loan', {
refresh: function (frm) { refresh: function (frm) {
if (frm.doc.docstatus == 1 && (frm.doc.status == "Sanctioned" || frm.doc.status == "Partially Disbursed")) { if (frm.doc.docstatus == 1 && (frm.doc.status == "Sanctioned" || frm.doc.status == "Partially Disbursed")) {
frm.add_custom_button(__('Make Disbursement Entry'), function () { frm.add_custom_button(__('Create Disbursement Entry'), function () {
frm.trigger("make_jv"); frm.trigger("make_jv");
}) })
} }

View File

@ -29,8 +29,8 @@ frappe.ui.form.on('Employee Onboarding', {
method: "erpnext.hr.doctype.employee_onboarding.employee_onboarding.make_employee", method: "erpnext.hr.doctype.employee_onboarding.employee_onboarding.make_employee",
frm: frm frm: frm
}); });
}, __("Make")); }, __('Create'));
frm.page.set_inner_btn_group_as_primary(__("Make")); frm.page.set_inner_btn_group_as_primary(__('Create'));
} }
if (frm.doc.docstatus === 1 && frm.doc.project) { if (frm.doc.docstatus === 1 && frm.doc.project) {
frappe.call({ frappe.call({

View File

@ -192,7 +192,7 @@ frappe.ui.form.on("Expense Claim", {
&& (cint(frm.doc.total_amount_reimbursed) < cint(frm.doc.total_sanctioned_amount)) && (cint(frm.doc.total_amount_reimbursed) < cint(frm.doc.total_sanctioned_amount))
&& frappe.model.can_create("Payment Entry")) { && frappe.model.can_create("Payment Entry")) {
frm.add_custom_button(__('Payment'), frm.add_custom_button(__('Payment'),
function() { frm.events.make_payment_entry(frm); }, __("Make")); function() { frm.events.make_payment_entry(frm); }, __('Create'));
} }
}, },

View File

@ -15,7 +15,7 @@ frappe.ui.form.on("Job Offer", {
refresh: function (frm) { refresh: function (frm) {
if ((!frm.doc.__islocal) && (frm.doc.status == 'Accepted') if ((!frm.doc.__islocal) && (frm.doc.status == 'Accepted')
&& (frm.doc.docstatus === 1) && (!frm.doc.__onload || !frm.doc.__onload.employee)) { && (frm.doc.docstatus === 1) && (!frm.doc.__onload || !frm.doc.__onload.employee)) {
frm.add_custom_button(__('Make Employee'), frm.add_custom_button(__('Create Employee'),
function () { function () {
erpnext.job_offer.make_employee(frm); erpnext.job_offer.make_employee(frm);
} }

View File

@ -40,7 +40,7 @@ frappe.ui.form.on('Loan', {
refresh: function (frm) { refresh: function (frm) {
if (frm.doc.docstatus == 1 && frm.doc.status == "Sanctioned") { if (frm.doc.docstatus == 1 && frm.doc.status == "Sanctioned") {
frm.add_custom_button(__('Make Disbursement Entry'), function() { frm.add_custom_button(__('Create Disbursement Entry'), function() {
frm.trigger("make_jv"); frm.trigger("make_jv");
}) })
} }
@ -54,7 +54,7 @@ frappe.ui.form.on('Loan', {
frm.set_value("total_amount_paid", total_amount_paid); frm.set_value("total_amount_paid", total_amount_paid);
; } ; }
if (frm.doc.docstatus == 1 && frm.doc.repayment_start_date && (frm.doc.applicant_type == 'Member' || frm.doc.repay_from_salary == 0)) { if (frm.doc.docstatus == 1 && frm.doc.repayment_start_date && (frm.doc.applicant_type == 'Member' || frm.doc.repay_from_salary == 0)) {
frm.add_custom_button(__('Make Repayment Entry'), function() { frm.add_custom_button(__('Create Repayment Entry'), function() {
frm.trigger("make_repayment_entry"); frm.trigger("make_repayment_entry");
}) })
} }
@ -157,7 +157,7 @@ frappe.ui.form.on('Loan', {
} }
dialog.show() dialog.show()
dialog.set_primary_action(__('Make Repayment Entry'), function() { dialog.set_primary_action(__('Create Repayment Entry'), function() {
frm.values = dialog.get_values(); frm.values = dialog.get_values();
if(frm.values) { if(frm.values) {
_make_repayment_entry(frm, dialog.fields_dict.payments.grid.get_selected_children()); _make_repayment_entry(frm, dialog.fields_dict.payments.grid.get_selected_children());

View File

@ -20,8 +20,8 @@ frappe.ui.form.on("Vehicle Log", {
if(frm.doc.docstatus == 1) { if(frm.doc.docstatus == 1) {
frm.add_custom_button(__('Expense Claim'), function() { frm.add_custom_button(__('Expense Claim'), function() {
frm.events.expense_claim(frm) frm.events.expense_claim(frm)
}, __("Make")); }, __('Create'));
frm.page.set_inner_btn_group_as_primary(__("Make")); frm.page.set_inner_btn_group_as_primary(__('Create'));
} }
}, },

View File

@ -19,7 +19,7 @@ def execute(filters=None):
return columns, data, None, chart return columns, data, None, chart
def get_columns(): def get_columns():
columns = [_("License") + ":Link/Vehicle:100", _("Make") + ":data:50", columns = [_("License") + ":Link/Vehicle:100", _('Create') + ":data:50",
_("Model") + ":data:50", _("Location") + ":data:100", _("Model") + ":data:50", _("Location") + ":data:100",
_("Log") + ":Link/Vehicle Log:100", _("Odometer") + ":Int:80", _("Log") + ":Link/Vehicle Log:100", _("Odometer") + ":Int:80",
_("Date") + ":Date:100", _("Fuel Qty") + ":Float:80", _("Date") + ":Date:100", _("Fuel Qty") + ":Float:80",

View File

@ -44,13 +44,13 @@ erpnext.maintenance.MaintenanceSchedule = frappe.ui.form.Controller.extend({
}); });
}, __("Get items from")); }, __("Get items from"));
} else if (this.frm.doc.docstatus === 1) { } else if (this.frm.doc.docstatus === 1) {
this.frm.add_custom_button(__("Make Maintenance Visit"), function() { this.frm.add_custom_button(__('Create Maintenance Visit'), function() {
frappe.model.open_mapped_doc({ frappe.model.open_mapped_doc({
method: "erpnext.maintenance.doctype.maintenance_schedule.maintenance_schedule.make_maintenance_visit", method: "erpnext.maintenance.doctype.maintenance_schedule.maintenance_schedule.make_maintenance_visit",
source_name: me.frm.doc.name, source_name: me.frm.doc.name,
frm: me.frm frm: me.frm
}) });
}, __("Make")); }, __('Create'));
} }
}, },

View File

@ -39,14 +39,14 @@ frappe.ui.form.on('Production Plan', {
&& frm.doc.status != 'Completed') { && frm.doc.status != 'Completed') {
frm.add_custom_button(__("Work Order"), ()=> { frm.add_custom_button(__("Work Order"), ()=> {
frm.trigger("make_work_order"); frm.trigger("make_work_order");
}, __("Make")); }, __('Create'));
} }
if (frm.doc.docstatus === 1 && frm.doc.mr_items if (frm.doc.docstatus === 1 && frm.doc.mr_items
&& !in_list(['Material Requested', 'Completed'], frm.doc.status)) { && !in_list(['Material Requested', 'Completed'], frm.doc.status)) {
frm.add_custom_button(__("Material Request"), ()=> { frm.add_custom_button(__("Material Request"), ()=> {
frm.trigger("make_material_request"); frm.trigger("make_material_request");
}, __("Make")); }, __('Create'));
} }
frm.trigger("material_requirement"); frm.trigger("material_requirement");

View File

@ -115,6 +115,7 @@ frappe.ui.form.on("Work Order", {
if (frm.doc.docstatus === 1 if (frm.doc.docstatus === 1
&& frm.doc.operations && frm.doc.operations.length && frm.doc.operations && frm.doc.operations.length
&& frm.doc.qty != frm.doc.material_transferred_for_manufacturing) { && frm.doc.qty != frm.doc.material_transferred_for_manufacturing) {
const not_completed = frm.doc.operations.filter(d => { const not_completed = frm.doc.operations.filter(d => {
if(d.status != 'Completed') { if(d.status != 'Completed') {
return true; return true;
@ -122,7 +123,7 @@ frappe.ui.form.on("Work Order", {
}); });
if(not_completed && not_completed.length) { if(not_completed && not_completed.length) {
frm.add_custom_button(__('Make Job Card'), () => { frm.add_custom_button(__('Create Job Card'), () => {
frm.trigger("make_job_card") frm.trigger("make_job_card")
}).addClass('btn-primary'); }).addClass('btn-primary');
} }
@ -148,7 +149,7 @@ frappe.ui.form.on("Work Order", {
if (frm.doc.status == "Completed" && if (frm.doc.status == "Completed" &&
frm.doc.__onload.backflush_raw_materials_based_on == "Material Transferred for Manufacture") { frm.doc.__onload.backflush_raw_materials_based_on == "Material Transferred for Manufacture") {
frm.add_custom_button(__("Make BOM"), () => { frm.add_custom_button(__('Create BOM'), () => {
frm.trigger("make_bom"); frm.trigger("make_bom");
}); });
} }
@ -554,7 +555,7 @@ erpnext.work_order = {
frappe.set_route("Form", doclist[0].doctype, doclist[0].name); frappe.set_route("Form", doclist[0].doctype, doclist[0].name);
} }
}); });
}, __("Select Quantity"), __("Make")); }, __("Select Quantity"), __('Create'));
}, },
make_consumption_se: function(frm, backflush_raw_materials_based_on) { make_consumption_se: function(frm, backflush_raw_materials_based_on) {

View File

@ -580,3 +580,6 @@ erpnext.patches.v11_0.update_delivery_trip_status
erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items
erpnext.patches.v11_0.set_missing_gst_hsn_code erpnext.patches.v11_0.set_missing_gst_hsn_code
erpnext.patches.v11_0.rename_bom_wo_fields erpnext.patches.v11_0.rename_bom_wo_fields
erpnext.patches.v12_0.rename_learn_to_help
erpnext.patches.v12_0.rename_accounts_desktop_icon_to_accounting
erpnext.patches.v12_0.replace_project_list_desktop_icon_with_projects_module_desktop_icon

View File

View File

@ -0,0 +1,10 @@
import frappe
from frappe import _
def execute():
accounts_module_icons = frappe.get_all('Desktop Icon', filters={
'module_name': 'Accounts'
}, fields=['name'])
for icon in accounts_module_icons:
frappe.db.set_value('Desktop Icon', icon.name, 'label', _('Accounting'))

View File

@ -0,0 +1,12 @@
import frappe
from frappe import _
def execute():
frappe.db.sql("""
UPDATE `tabDesktop Icon`
SET
`module_name`='Help', `label`=%s
WHERE
`module_name`='Learn' AND
`standard`=1
""", _('Help'))

View File

@ -0,0 +1,24 @@
import frappe
def execute():
frappe.db.sql("""DELETE
FROM `tabDesktop Icon`
WHERE
`module_name` in ('Project', 'Projects') AND
`standard`=1 AND
`app`='erpnext'
""")
desktop_icon = frappe.get_doc({
'doctype': 'Desktop Icon',
'idx': 5,
'standard': 1,
'app': 'erpnext',
'owner': 'Administrator',
'module_name': 'Projects',
'color': '#8e44ad',
'icon': 'octicon octicon-rocket',
'type': 'module'
})
desktop_icon.save()

View File

@ -41,12 +41,12 @@ frappe.ui.form.on("Timesheet", {
refresh: function(frm) { refresh: function(frm) {
if(frm.doc.docstatus==1) { if(frm.doc.docstatus==1) {
if(frm.doc.per_billed < 100 && frm.doc.total_billable_hours && frm.doc.total_billable_hours > frm.doc.total_billed_hours){ if(frm.doc.per_billed < 100 && frm.doc.total_billable_hours && frm.doc.total_billable_hours > frm.doc.total_billed_hours){
frm.add_custom_button(__("Make Sales Invoice"), function() { frm.trigger("make_invoice") }, frm.add_custom_button(__('Create Sales Invoice'), function() { frm.trigger("make_invoice") },
"fa fa-file-alt"); "fa fa-file-alt");
} }
if(!frm.doc.salary_slip && frm.doc.employee){ if(!frm.doc.salary_slip && frm.doc.employee){
frm.add_custom_button(__("Make Salary Slip"), function() { frm.trigger("make_salary_slip") }, frm.add_custom_button(__('Create Salary Slip'), function() { frm.trigger("make_salary_slip") },
"fa fa-file-alt"); "fa fa-file-alt");
} }
} }
@ -106,7 +106,7 @@ frappe.ui.form.on("Timesheet", {
] ]
}); });
dialog.set_primary_action(__("Make Sales Invoice"), () => { dialog.set_primary_action(__('Create Sales Invoice'), () => {
var args = dialog.get_values(); var args = dialog.get_values();
if(!args) return; if(!args) return;
dialog.hide(); dialog.hide();

View File

@ -21,13 +21,13 @@ frappe.ui.form.on("Communication", {
frappe.confirm(__(confirm_msg, [__("Lead")]), () => { frappe.confirm(__(confirm_msg, [__("Lead")]), () => {
frm.trigger('make_lead_from_communication'); frm.trigger('make_lead_from_communication');
}) })
}, __("Make")); }, __('Create'));
frm.add_custom_button(__("Opportunity"), () => { frm.add_custom_button(__("Opportunity"), () => {
frappe.confirm(__(confirm_msg, [__("Opportunity")]), () => { frappe.confirm(__(confirm_msg, [__("Opportunity")]), () => {
frm.trigger('make_opportunity_from_communication'); frm.trigger('make_opportunity_from_communication');
}) })
}, __("Make")); }, __('Create'));
} }
}, },

View File

@ -108,7 +108,7 @@ frappe.ui.form.on("Customer", {
frm.add_custom_button(__('Pricing Rule'), function () { frm.add_custom_button(__('Pricing Rule'), function () {
erpnext.utils.make_pricing_rule(frm.doc.doctype, frm.doc.name); erpnext.utils.make_pricing_rule(frm.doc.doctype, frm.doc.name);
}, __("Make")); }, __('Create'));
// indicator // indicator
erpnext.utils.set_party_dashboard_indicators(frm); erpnext.utils.set_party_dashboard_indicators(frm);

View File

@ -52,7 +52,7 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
if(doc.docstatus == 1 && doc.status!=='Lost') { if(doc.docstatus == 1 && doc.status!=='Lost') {
if(!doc.valid_till || frappe.datetime.get_diff(doc.valid_till, frappe.datetime.get_today()) >= 0) { if(!doc.valid_till || frappe.datetime.get_diff(doc.valid_till, frappe.datetime.get_today()) >= 0) {
cur_frm.add_custom_button(__('Sales Order'), cur_frm.add_custom_button(__('Sales Order'),
cur_frm.cscript['Make Sales Order'], __("Make")); cur_frm.cscript['Make Sales Order'], __('Create'));
} }
if(doc.status!=="Ordered") { if(doc.status!=="Ordered") {
@ -63,10 +63,10 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
if(!doc.auto_repeat) { if(!doc.auto_repeat) {
cur_frm.add_custom_button(__('Subscription'), function() { cur_frm.add_custom_button(__('Subscription'), function() {
erpnext.utils.make_subscription(doc.doctype, doc.name) erpnext.utils.make_subscription(doc.doctype, doc.name)
}, __("Make")) }, __('Create'))
} }
cur_frm.page.set_inner_btn_group_as_primary(__("Make")); cur_frm.page.set_inner_btn_group_as_primary(__('Create'));
} }
if (this.frm.doc.docstatus===0) { if (this.frm.doc.docstatus===0) {

View File

@ -133,61 +133,61 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
// delivery note // delivery note
if(flt(doc.per_delivered, 6) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1 && allow_delivery) { if(flt(doc.per_delivered, 6) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1 && allow_delivery) {
this.frm.add_custom_button(__('Delivery'), this.frm.add_custom_button(__('Delivery'),
function() { me.make_delivery_note_based_on_delivery_date(); }, __("Make")); function() { me.make_delivery_note_based_on_delivery_date(); }, __('Create'));
this.frm.add_custom_button(__('Work Order'), this.frm.add_custom_button(__('Work Order'),
function() { me.make_work_order() }, __("Make")); function() { me.make_work_order() }, __('Create'));
this.frm.page.set_inner_btn_group_as_primary(__("Make")); this.frm.page.set_inner_btn_group_as_primary(__('Create'));
} }
// sales invoice // sales invoice
if(flt(doc.per_billed, 6) < 100) { if(flt(doc.per_billed, 6) < 100) {
this.frm.add_custom_button(__('Invoice'), this.frm.add_custom_button(__('Invoice'),
function() { me.make_sales_invoice() }, __("Make")); function() { me.make_sales_invoice() }, __('Create'));
} }
// material request // material request
if(!doc.order_type || ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1 if(!doc.order_type || ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1
&& flt(doc.per_delivered, 6) < 100) { && flt(doc.per_delivered, 6) < 100) {
this.frm.add_custom_button(__('Material Request'), this.frm.add_custom_button(__('Material Request'),
function() { me.make_material_request() }, __("Make")); function() { me.make_material_request() }, __('Create'));
this.frm.add_custom_button(__('Request for Raw Materials'), this.frm.add_custom_button(__('Request for Raw Materials'),
function() { me.make_raw_material_request() }, __("Make")); function() { me.make_raw_material_request() }, __('Create'));
} }
// make purchase order // make purchase order
if(flt(doc.per_delivered, 6) < 100 && allow_purchase) { if(flt(doc.per_delivered, 6) < 100 && allow_purchase) {
this.frm.add_custom_button(__('Purchase Order'), this.frm.add_custom_button(__('Purchase Order'),
function() { me.make_purchase_order() }, __("Make")); function() { me.make_purchase_order() }, __('Create'));
} }
// payment request // payment request
if(flt(doc.per_billed)==0) { if(flt(doc.per_billed)==0) {
this.frm.add_custom_button(__('Payment Request'), this.frm.add_custom_button(__('Payment Request'),
function() { me.make_payment_request() }, __("Make")); function() { me.make_payment_request() }, __('Create'));
this.frm.add_custom_button(__('Payment'), this.frm.add_custom_button(__('Payment'),
function() { me.make_payment_entry() }, __("Make")); function() { me.make_payment_entry() }, __('Create'));
} }
// maintenance // maintenance
if(flt(doc.per_delivered, 2) < 100 && if(flt(doc.per_delivered, 2) < 100 &&
["Sales", "Shopping Cart"].indexOf(doc.order_type)===-1) { ["Sales", "Shopping Cart"].indexOf(doc.order_type)===-1) {
this.frm.add_custom_button(__('Maintenance Visit'), this.frm.add_custom_button(__('Maintenance Visit'),
function() { me.make_maintenance_visit() }, __("Make")); function() { me.make_maintenance_visit() }, __('Create'));
this.frm.add_custom_button(__('Maintenance Schedule'), this.frm.add_custom_button(__('Maintenance Schedule'),
function() { me.make_maintenance_schedule() }, __("Make")); function() { me.make_maintenance_schedule() }, __('Create'));
} }
// project // project
if(flt(doc.per_delivered, 2) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1 && allow_delivery) { if(flt(doc.per_delivered, 2) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1 && allow_delivery) {
this.frm.add_custom_button(__('Project'), this.frm.add_custom_button(__('Project'),
function() { me.make_project() }, __("Make")); function() { me.make_project() }, __('Create'));
} }
if(!doc.auto_repeat) { if(!doc.auto_repeat) {
this.frm.add_custom_button(__('Subscription'), function() { this.frm.add_custom_button(__('Subscription'), function() {
erpnext.utils.make_subscription(doc.doctype, doc.name) erpnext.utils.make_subscription(doc.doctype, doc.name)
}, __("Make")) }, __('Create'))
} }
} else { } else {
@ -293,7 +293,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
} }
}); });
}, },
primary_action_label: __('Make') primary_action_label: __('Create')
}); });
d.show(); d.show();
} }
@ -391,7 +391,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
} }
}); });
}, },
primary_action_label: __('Make') primary_action_label: __('Create')
}); });
d.show(); d.show();
}, },
@ -507,7 +507,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
} }
}}, }},
{"fieldtype": "Button", "label": __("Make Purchase Order"), "fieldname": "make_purchase_order", "cssClass": "btn-primary"}, {"fieldtype": "Button", "label": __('Create Purchase Order'), "fieldname": "make_purchase_order", "cssClass": "btn-primary"},
] ]
}); });

View File

@ -52,7 +52,7 @@ frappe.ui.form.on("Company", {
frm.toggle_enable("default_currency", (frm.doc.__onload && frm.toggle_enable("default_currency", (frm.doc.__onload &&
!frm.doc.__onload.transactions_exist)); !frm.doc.__onload.transactions_exist));
frm.add_custom_button(__('Make Tax Template'), function() { frm.add_custom_button(__('Create Tax Template'), function() {
frm.trigger("make_default_tax_template"); frm.trigger("make_default_tax_template");
}); });
@ -74,7 +74,7 @@ frappe.ui.form.on("Company", {
frm.add_custom_button(__('Default Tax Template'), function() { frm.add_custom_button(__('Default Tax Template'), function() {
frm.trigger("make_default_tax_template"); frm.trigger("make_default_tax_template");
}, __("Make")); }, __('Create'));
} }
erpnext.company.set_chart_of_accounts_options(frm.doc); erpnext.company.set_chart_of_accounts_options(frm.doc);

View File

@ -104,16 +104,16 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
if (!doc.is_return && doc.status!="Closed") { if (!doc.is_return && doc.status!="Closed") {
if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1) if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1)
this.frm.add_custom_button(__('Installation Note'), function() { this.frm.add_custom_button(__('Installation Note'), function() {
me.make_installation_note() }, __("Make")); me.make_installation_note() }, __('Create'));
if (doc.docstatus==1) { if (doc.docstatus==1) {
this.frm.add_custom_button(__('Sales Return'), function() { this.frm.add_custom_button(__('Sales Return'), function() {
me.make_sales_return() }, __("Make")); me.make_sales_return() }, __('Create'));
} }
if (doc.docstatus==1) { if (doc.docstatus==1) {
this.frm.add_custom_button(__('Delivery Trip'), function() { this.frm.add_custom_button(__('Delivery Trip'), function() {
me.make_delivery_trip() }, __("Make")); me.make_delivery_trip() }, __('Create'));
} }
if(doc.docstatus==0 && !doc.__islocal) { if(doc.docstatus==0 && !doc.__islocal) {
@ -121,11 +121,11 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
frappe.model.open_mapped_doc({ frappe.model.open_mapped_doc({
method: "erpnext.stock.doctype.delivery_note.delivery_note.make_packing_slip", method: "erpnext.stock.doctype.delivery_note.delivery_note.make_packing_slip",
frm: me.frm frm: me.frm
}) }, __("Make")); }) }, __('Create'));
} }
if (!doc.__islocal && doc.docstatus==1) { if (!doc.__islocal && doc.docstatus==1) {
this.frm.page.set_inner_btn_group_as_primary(__("Make")); this.frm.page.set_inner_btn_group_as_primary(__('Create'));
} }
if (this.frm.doc.docstatus===0) { if (this.frm.doc.docstatus===0) {
@ -170,7 +170,7 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
if(!from_sales_invoice) { if(!from_sales_invoice) {
this.frm.add_custom_button(__('Invoice'), function() { me.make_sales_invoice() }, this.frm.add_custom_button(__('Invoice'), function() { me.make_sales_invoice() },
__("Make")); __('Create'));
} }
} }
@ -183,7 +183,7 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
if(doc.docstatus==1 && !doc.is_return && !doc.auto_repeat) { if(doc.docstatus==1 && !doc.is_return && !doc.auto_repeat) {
cur_frm.add_custom_button(__('Subscription'), function() { cur_frm.add_custom_button(__('Subscription'), function() {
erpnext.utils.make_subscription(doc.doctype, doc.name) erpnext.utils.make_subscription(doc.doctype, doc.name)
}, __("Make")) }, __('Create'))
} }
}, },

View File

@ -66,17 +66,17 @@ frappe.ui.form.on("Item", {
if(frm.doc.variant_based_on==="Item Attribute") { if(frm.doc.variant_based_on==="Item Attribute") {
frm.add_custom_button(__("Single Variant"), function() { frm.add_custom_button(__("Single Variant"), function() {
erpnext.item.show_single_variant_dialog(frm); erpnext.item.show_single_variant_dialog(frm);
}, __("Make")); }, __('Create'));
frm.add_custom_button(__("Multiple Variants"), function() { frm.add_custom_button(__("Multiple Variants"), function() {
erpnext.item.show_multiple_variants_dialog(frm); erpnext.item.show_multiple_variants_dialog(frm);
}, __("Make")); }, __('Create'));
} else { } else {
frm.add_custom_button(__("Variant"), function() { frm.add_custom_button(__("Variant"), function() {
erpnext.item.show_modal_for_manufacturers(frm); erpnext.item.show_modal_for_manufacturers(frm);
}, __("Make")); }, __('Create'));
} }
frm.page.set_inner_btn_group_as_primary(__("Make")); frm.page.set_inner_btn_group_as_primary(__('Create'));
} }
if (frm.doc.variant_of) { if (frm.doc.variant_of) {
frm.set_intro(__('This Item is a Variant of {0} (Template).', frm.set_intro(__('This Item is a Variant of {0} (Template).',
@ -378,7 +378,7 @@ $.extend(erpnext.item, {
] ]
}); });
dialog.set_primary_action(__('Make'), function() { dialog.set_primary_action(__('Create'), function() {
var data = dialog.get_values(); var data = dialog.get_values();
if(!data) return; if(!data) return;
@ -424,7 +424,7 @@ $.extend(erpnext.item, {
lengths.push(selected_attributes[key].length); lengths.push(selected_attributes[key].length);
}); });
if(lengths.includes(0)) { if(lengths.includes(0)) {
me.multiple_variant_dialog.get_primary_btn().html(__("Make Variants")); me.multiple_variant_dialog.get_primary_btn().html(__('Create Variants'));
me.multiple_variant_dialog.disable_primary_action(); me.multiple_variant_dialog.disable_primary_action();
} else { } else {
let no_of_combinations = lengths.reduce((a, b) => a * b, 1); let no_of_combinations = lengths.reduce((a, b) => a * b, 1);
@ -455,7 +455,7 @@ $.extend(erpnext.item, {
].concat(fields) ].concat(fields)
}); });
me.multiple_variant_dialog.set_primary_action(__("Make Variants"), () => { me.multiple_variant_dialog.set_primary_action(__('Create Variants'), () => {
let selected_attributes = get_selected_attributes(); let selected_attributes = get_selected_attributes();
me.multiple_variant_dialog.hide(); me.multiple_variant_dialog.hide();
@ -587,11 +587,11 @@ $.extend(erpnext.item, {
} }
var d = new frappe.ui.Dialog({ var d = new frappe.ui.Dialog({
title: __("Make Variant"), title: __('Create Variant'),
fields: fields fields: fields
}); });
d.set_primary_action(__("Make"), function() { d.set_primary_action(__('Create'), function() {
var args = d.get_values(); var args = d.get_values();
if(!args) return; if(!args) return;
frappe.call({ frappe.call({

View File

@ -54,40 +54,40 @@ frappe.ui.form.on('Material Request', {
// make // make
if (frm.doc.material_request_type === "Material Transfer") { if (frm.doc.material_request_type === "Material Transfer") {
frm.add_custom_button(__("Transfer Material"), frm.add_custom_button(__("Transfer Material"),
() => frm.events.make_stock_entry(frm), __("Make")); () => frm.events.make_stock_entry(frm), __('Create'));
} }
if (frm.doc.material_request_type === "Material Issue") { if (frm.doc.material_request_type === "Material Issue") {
frm.add_custom_button(__("Issue Material"), frm.add_custom_button(__("Issue Material"),
() => frm.events.make_stock_entry(frm), __("Make")); () => frm.events.make_stock_entry(frm), __('Create'));
} }
if (frm.doc.material_request_type === "Customer Provided") { if (frm.doc.material_request_type === "Customer Provided") {
frm.add_custom_button(__("Material Receipt"), frm.add_custom_button(__("Material Receipt"),
() => frm.events.make_stock_entry(frm), __("Make")); () => frm.events.make_stock_entry(frm), __('Create'));
} }
if (frm.doc.material_request_type === "Purchase") { if (frm.doc.material_request_type === "Purchase") {
frm.add_custom_button(__('Purchase Order'), frm.add_custom_button(__('Purchase Order'),
() => frm.events.make_purchase_order(frm), __("Make")); () => frm.events.make_purchase_order(frm), __('Create'));
} }
if (frm.doc.material_request_type === "Purchase") { if (frm.doc.material_request_type === "Purchase") {
frm.add_custom_button(__("Request for Quotation"), frm.add_custom_button(__("Request for Quotation"),
() => frm.events.make_request_for_quotation(frm), __("Make")); () => frm.events.make_request_for_quotation(frm), __('Create'));
} }
if (frm.doc.material_request_type === "Purchase") { if (frm.doc.material_request_type === "Purchase") {
frm.add_custom_button(__("Supplier Quotation"), frm.add_custom_button(__("Supplier Quotation"),
() => frm.events.make_supplier_quotation(frm), __("Make")); () => frm.events.make_supplier_quotation(frm), __('Create'));
} }
if (frm.doc.material_request_type === "Manufacture") { if (frm.doc.material_request_type === "Manufacture") {
frm.add_custom_button(__("Work Order"), frm.add_custom_button(__("Work Order"),
() => frm.events.raise_work_orders(frm), __("Make")); () => frm.events.raise_work_orders(frm), __('Create'));
} }
frm.page.set_inner_btn_group_as_primary(__("Make")); frm.page.set_inner_btn_group_as_primary(__('Create'));
// stop // stop
frm.add_custom_button(__('Stop'), frm.add_custom_button(__('Stop'),

View File

@ -101,20 +101,20 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
cur_frm.add_custom_button(__("Close"), this.close_purchase_receipt, __("Status")) cur_frm.add_custom_button(__("Close"), this.close_purchase_receipt, __("Status"))
} }
cur_frm.add_custom_button(__('Return'), this.make_purchase_return, __("Make")); cur_frm.add_custom_button(__('Return'), this.make_purchase_return, __('Create'));
if(flt(this.frm.doc.per_billed) < 100) { if(flt(this.frm.doc.per_billed) < 100) {
cur_frm.add_custom_button(__('Invoice'), this.make_purchase_invoice, __("Make")); cur_frm.add_custom_button(__('Invoice'), this.make_purchase_invoice, __('Create'));
} }
cur_frm.add_custom_button(__('Retention Stock Entry'), this.make_retention_stock_entry, __("Make")); cur_frm.add_custom_button(__('Retention Stock Entry'), this.make_retention_stock_entry, __('Create'));
if(!this.frm.doc.auto_repeat) { if(!this.frm.doc.auto_repeat) {
cur_frm.add_custom_button(__('Subscription'), function() { cur_frm.add_custom_button(__('Subscription'), function() {
erpnext.utils.make_subscription(me.frm.doc.doctype, me.frm.doc.name) erpnext.utils.make_subscription(me.frm.doc.doctype, me.frm.doc.name)
}, __("Make")) }, __('Create'))
} }
cur_frm.page.set_inner_btn_group_as_primary(__("Make")); cur_frm.page.set_inner_btn_group_as_primary(__('Create'));
} }
} }

View File

@ -95,7 +95,7 @@ frappe.ui.form.on('Stock Entry', {
refresh: function(frm) { refresh: function(frm) {
if(!frm.doc.docstatus) { if(!frm.doc.docstatus) {
frm.trigger('validate_purpose_consumption'); frm.trigger('validate_purpose_consumption');
frm.add_custom_button(__('Make Material Request'), function() { frm.add_custom_button(__('Create Material Request'), function() {
frappe.model.with_doctype('Material Request', function() { frappe.model.with_doctype('Material Request', function() {
var mr = frappe.model.get_new_doc('Material Request'); var mr = frappe.model.get_new_doc('Material Request');
var items = frm.get_field('items').grid.get_selected_children(); var items = frm.get_field('items').grid.get_selected_children();
@ -184,7 +184,7 @@ frappe.ui.form.on('Stock Entry', {
} }
if(frm.doc.docstatus==1 && frm.doc.purpose == "Material Receipt" && frm.get_sum('items', 'sample_quantity')) { if(frm.doc.docstatus==1 && frm.doc.purpose == "Material Receipt" && frm.get_sum('items', 'sample_quantity')) {
frm.add_custom_button(__('Make Sample Retention Stock Entry'), function () { frm.add_custom_button(__('Create Sample Retention Stock Entry'), function () {
frm.trigger("make_retention_stock_entry"); frm.trigger("make_retention_stock_entry");
}); });
} }
@ -710,7 +710,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
excise = locals['Journal Entry'][excise]; excise = locals['Journal Entry'][excise];
excise.voucher_type = 'Excise Entry'; excise.voucher_type = 'Excise Entry';
frappe.set_route('Form', 'Journal Entry', excise.name); frappe.set_route('Form', 'Journal Entry', excise.name);
}, __("Make")); }, __('Create'));
}, },
items_add: function(doc, cdt, cdn) { items_add: function(doc, cdt, cdn) {

View File

@ -62,7 +62,7 @@ def get_help_messages():
doctype='Lead', doctype='Lead',
title=_('Create Leads'), title=_('Create Leads'),
description=_('Leads help you get business, add all your contacts and more as your leads'), description=_('Leads help you get business, add all your contacts and more as your leads'),
action=_('Make Lead'), action=_('Create Lead'),
route='List/Lead', route='List/Lead',
domain=('Manufacturing', 'Retail', 'Services', 'Distribution'), domain=('Manufacturing', 'Retail', 'Services', 'Distribution'),
target=3 target=3
@ -71,7 +71,7 @@ def get_help_messages():
doctype='Quotation', doctype='Quotation',
title=_('Create customer quotes'), title=_('Create customer quotes'),
description=_('Quotations are proposals, bids you have sent to your customers'), description=_('Quotations are proposals, bids you have sent to your customers'),
action=_('Make Quotation'), action=_('Create Quotation'),
route='List/Quotation', route='List/Quotation',
domain=('Manufacturing', 'Retail', 'Services', 'Distribution'), domain=('Manufacturing', 'Retail', 'Services', 'Distribution'),
target=3 target=3
@ -79,8 +79,8 @@ def get_help_messages():
frappe._dict( frappe._dict(
doctype='Sales Order', doctype='Sales Order',
title=_('Manage your orders'), title=_('Manage your orders'),
description=_('Make Sales Orders to help you plan your work and deliver on-time'), description=_('Create Sales Orders to help you plan your work and deliver on-time'),
action=_('Make Sales Order'), action=_('Create Sales Order'),
route='List/Sales Order', route='List/Sales Order',
domain=('Manufacturing', 'Retail', 'Services', 'Distribution'), domain=('Manufacturing', 'Retail', 'Services', 'Distribution'),
target=3 target=3
@ -89,7 +89,7 @@ def get_help_messages():
doctype='Purchase Order', doctype='Purchase Order',
title=_('Create Purchase Orders'), title=_('Create Purchase Orders'),
description=_('Purchase orders help you plan and follow up on your purchases'), description=_('Purchase orders help you plan and follow up on your purchases'),
action=_('Make Purchase Order'), action=_('Create Purchase Order'),
route='List/Purchase Order', route='List/Purchase Order',
domain=('Manufacturing', 'Retail', 'Services', 'Distribution'), domain=('Manufacturing', 'Retail', 'Services', 'Distribution'),
target=3 target=3
@ -98,7 +98,7 @@ def get_help_messages():
doctype='User', doctype='User',
title=_('Create Users'), title=_('Create Users'),
description=_('Add the rest of your organization as your users. You can also add invite Customers to your portal by adding them from Contacts'), description=_('Add the rest of your organization as your users. You can also add invite Customers to your portal by adding them from Contacts'),
action=_('Make User'), action=_('Create User'),
route='List/User', route='List/User',
domain=('Manufacturing', 'Retail', 'Services', 'Distribution'), domain=('Manufacturing', 'Retail', 'Services', 'Distribution'),
target=3 target=3
@ -107,7 +107,7 @@ def get_help_messages():
doctype='Timesheet', doctype='Timesheet',
title=_('Add Timesheets'), title=_('Add Timesheets'),
description=_('Timesheets help keep track of time, cost and billing for activites done by your team'), description=_('Timesheets help keep track of time, cost and billing for activites done by your team'),
action=_('Make Timesheet'), action=_('Create Timesheet'),
route='List/Timesheet', route='List/Timesheet',
domain=('Services',), domain=('Services',),
target=5 target=5
@ -116,7 +116,7 @@ def get_help_messages():
doctype='Student', doctype='Student',
title=_('Add Students'), title=_('Add Students'),
description=_('Students are at the heart of the system, add all your students'), description=_('Students are at the heart of the system, add all your students'),
action=_('Make Student'), action=_('Create Student'),
route='List/Student', route='List/Student',
domain=('Education',), domain=('Education',),
target=5 target=5
@ -125,7 +125,7 @@ def get_help_messages():
doctype='Student Batch', doctype='Student Batch',
title=_('Group your students in batches'), title=_('Group your students in batches'),
description=_('Student Batches help you track attendance, assessments and fees for students'), description=_('Student Batches help you track attendance, assessments and fees for students'),
action=_('Make Student Batch'), action=_('Create Student Batch'),
route='List/Student Batch', route='List/Student Batch',
domain=('Education',), domain=('Education',),
target=3 target=3
@ -134,7 +134,7 @@ def get_help_messages():
doctype='Employee', doctype='Employee',
title=_('Create Employee Records'), title=_('Create Employee Records'),
description=_('Create Employee records to manage leaves, expense claims and payroll'), description=_('Create Employee records to manage leaves, expense claims and payroll'),
action=_('Make Employee'), action=_('Create Employee'),
route='List/Employee', route='List/Employee',
target=3 target=3
) )