Merge pull request #16273 from surajshetty3416/general-ui-fixes
General UI fixes and changes
This commit is contained in:
commit
ec86796d1b
@ -61,13 +61,13 @@ frappe.treeview_settings["Account"] = {
|
||||
frappe.set_route('List', 'Period Closing Voucher', {company: get_company()});
|
||||
}, __('View'));
|
||||
|
||||
// make
|
||||
|
||||
treeview.page.add_inner_button(__("Journal Entry"), function() {
|
||||
frappe.new_doc('Journal Entry', {company: get_company()});
|
||||
}, __('Make'));
|
||||
}, __('Create'));
|
||||
treeview.page.add_inner_button(__("New Company"), function() {
|
||||
frappe.new_doc('Company');
|
||||
}, __('Make'));
|
||||
}, __('Create'));
|
||||
|
||||
// financial statements
|
||||
for (let report of ['Trial Balance', 'General Ledger', 'Balance Sheet',
|
||||
|
@ -21,7 +21,7 @@ frappe.ui.form.on('Exchange Rate Revaluation', {
|
||||
|
||||
refresh: function(frm) {
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ frappe.ui.form.on("Journal Entry", {
|
||||
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)) {
|
||||
frm.add_custom_button(__("Make Inter Company Journal Entry"),
|
||||
frm.add_custom_button(__("Create Inter Company Journal Entry"),
|
||||
function() {
|
||||
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();
|
||||
var args = d.get_values();
|
||||
frappe.call({
|
||||
|
@ -15,7 +15,7 @@ frappe.ui.form.on('Opening Invoice Creation Tool', {
|
||||
refresh: function(frm) {
|
||||
frm.disable_save();
|
||||
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);
|
||||
return frm.call({
|
||||
doc: frm.doc,
|
||||
|
@ -11,9 +11,9 @@ frappe.ui.form.on('Payment Order', {
|
||||
|
||||
// payment Entry
|
||||
if (frm.doc.docstatus==1) {
|
||||
frm.add_custom_button(__('Make Payment Entries'),
|
||||
frm.add_custom_button(__('Create Payment Entries'),
|
||||
function() {
|
||||
frm.trigger("make_payment_records")
|
||||
frm.trigger("make_payment_records");
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -34,7 +34,7 @@ frappe.ui.form.on("Payment Request", "refresh", function(frm) {
|
||||
}
|
||||
|
||||
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({
|
||||
method: "erpnext.accounts.doctype.payment_request.payment_request.make_payment_entry",
|
||||
args: {"docname": frm.doc.name},
|
||||
|
@ -46,40 +46,40 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
|
||||
this.frm.add_custom_button(
|
||||
__('Unblock Invoice'),
|
||||
function() {me.unblock_invoice()},
|
||||
__('Make')
|
||||
__('Create')
|
||||
);
|
||||
} else if (!doc.on_hold) {
|
||||
this.frm.add_custom_button(
|
||||
__('Block Invoice'),
|
||||
function() {me.block_invoice()},
|
||||
__('Make')
|
||||
__('Create')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if(doc.docstatus == 1 && doc.outstanding_amount != 0
|
||||
&& !(doc.is_return && doc.return_against)) {
|
||||
this.frm.add_custom_button(__('Payment'), this.make_payment_entry, __("Make"));
|
||||
cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
|
||||
this.frm.add_custom_button(__('Payment'), this.make_payment_entry, __('Create'));
|
||||
cur_frm.page.set_inner_btn_group_as_primary(__('Create'));
|
||||
}
|
||||
|
||||
if(!doc.is_return && doc.docstatus==1) {
|
||||
if(doc.outstanding_amount >= 0 || Math.abs(flt(doc.outstanding_amount)) < flt(doc.grand_total)) {
|
||||
cur_frm.add_custom_button(__('Return / Debit Note'),
|
||||
this.make_debit_note, __("Make"));
|
||||
this.make_debit_note, __('Create'));
|
||||
}
|
||||
|
||||
if(!doc.auto_repeat) {
|
||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
||||
erpnext.utils.make_subscription(doc.doctype, doc.name)
|
||||
}, __("Make"))
|
||||
}, __('Create'))
|
||||
}
|
||||
}
|
||||
|
||||
if (doc.outstanding_amount > 0 && !cint(doc.is_return)) {
|
||||
cur_frm.add_custom_button(__('Payment Request'), function() {
|
||||
me.make_payment_request()
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
}
|
||||
|
||||
if(doc.docstatus===0) {
|
||||
@ -128,7 +128,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
|
||||
if (internal == 1 && disabled == 0) {
|
||||
me.frm.add_custom_button("Inter Company Invoice", function() {
|
||||
me.make_inter_company_invoice(me.frm);
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -51,8 +51,8 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
||||
if (doc.docstatus == 1 && doc.outstanding_amount!=0
|
||||
&& !(cint(doc.is_return) && doc.return_against)) {
|
||||
cur_frm.add_custom_button(__('Payment'),
|
||||
this.make_payment_entry, __("Make"));
|
||||
cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
|
||||
this.make_payment_entry, __('Create'));
|
||||
cur_frm.page.set_inner_btn_group_as_primary(__('Create'));
|
||||
}
|
||||
|
||||
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)) {
|
||||
cur_frm.add_custom_button(__('Return / Credit Note'),
|
||||
this.make_sales_return, __("Make"));
|
||||
cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
|
||||
this.make_sales_return, __('Create'));
|
||||
cur_frm.page.set_inner_btn_group_as_primary(__('Create'));
|
||||
}
|
||||
|
||||
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) {
|
||||
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)) {
|
||||
cur_frm.add_custom_button(__('Payment Request'), function() {
|
||||
me.make_payment_request();
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
}
|
||||
|
||||
if(!doc.auto_repeat) {
|
||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
||||
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) {
|
||||
me.frm.add_custom_button("Inter Company Invoice", function() {
|
||||
me.make_inter_company_invoice();
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ frappe.ui.form.on('Share Transfer', {
|
||||
};
|
||||
});
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
@ -81,26 +81,26 @@ frappe.ui.form.on('Asset', {
|
||||
if (frm.doc.status=='Submitted' && !frm.doc.is_existing_asset && !frm.doc.purchase_invoice) {
|
||||
frm.add_custom_button(__("Purchase Invoice"), function() {
|
||||
frm.trigger("make_purchase_invoice");
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
}
|
||||
if (frm.doc.maintenance_required && !frm.doc.maintenance_schedule) {
|
||||
frm.add_custom_button(__("Asset Maintenance"), function() {
|
||||
frm.trigger("create_asset_maintenance");
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
}
|
||||
if (frm.doc.status != 'Fully Depreciated') {
|
||||
frm.add_custom_button(__("Asset Value Adjustment"), function() {
|
||||
frm.trigger("create_asset_adjustment");
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
}
|
||||
|
||||
if (!frm.doc.calculate_depreciation) {
|
||||
frm.add_custom_button(__("Depreciation Entry"), function() {
|
||||
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");
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
|
||||
|
||||
if(doc.docstatus == 1 && doc.status != "Closed") {
|
||||
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") {
|
||||
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)
|
||||
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") {
|
||||
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) {
|
||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
||||
erpnext.utils.make_subscription(doc.doctype, doc.name)
|
||||
}, __("Make"))
|
||||
}, __('Create'))
|
||||
}
|
||||
|
||||
if(flt(doc.per_billed)==0) {
|
||||
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'));
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -31,7 +31,7 @@ frappe.ui.form.on("Request for Quotation",{
|
||||
|
||||
refresh: function(frm, cdt, cdn) {
|
||||
if (frm.doc.docstatus === 1) {
|
||||
frm.add_custom_button(__("Make"),
|
||||
frm.add_custom_button(__('Create'),
|
||||
function(){ frm.trigger("make_suppplier_quotation") }, __("Supplier Quotation"));
|
||||
|
||||
frm.add_custom_button(__("View"),
|
||||
@ -147,7 +147,7 @@ frappe.ui.form.on("Request for Quotation",{
|
||||
"fieldname": "supplier",
|
||||
"options": doc.suppliers.map(d => d.supplier),
|
||||
"reqd": 1 },
|
||||
{ "fieldtype": "Button", "label": __("Make Supplier Quotation"),
|
||||
{ "fieldtype": "Button", "label": __('Create Supplier Quotation'),
|
||||
"fieldname": "make_supplier_quotation", "cssClass": "btn-primary" },
|
||||
]
|
||||
});
|
||||
|
@ -47,11 +47,11 @@ frappe.ui.form.on("Supplier", {
|
||||
|
||||
frm.add_custom_button(__('Bank Account'), function () {
|
||||
erpnext.utils.make_bank_account(frm.doc.doctype, frm.doc.name);
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
|
||||
frm.add_custom_button(__('Pricing Rule'), function () {
|
||||
erpnext.utils.make_pricing_rule(frm.doc.doctype, frm.doc.name);
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
|
||||
// indicators
|
||||
erpnext.utils.set_party_dashboard_indicators(frm);
|
||||
|
@ -18,15 +18,15 @@ erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.ext
|
||||
this._super();
|
||||
if (this.frm.doc.docstatus === 1) {
|
||||
cur_frm.add_custom_button(__("Purchase Order"), this.make_purchase_order,
|
||||
__("Make"));
|
||||
cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
|
||||
__('Create'));
|
||||
cur_frm.page.set_inner_btn_group_as_primary(__('Create'));
|
||||
cur_frm.add_custom_button(__("Quotation"), this.make_quotation,
|
||||
__("Make"));
|
||||
__('Create'));
|
||||
|
||||
if(!this.frm.doc.auto_repeat) {
|
||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
||||
erpnext.utils.make_subscription(me.frm.doc.doctype, me.frm.doc.name)
|
||||
}, __("Make"))
|
||||
}, __('Create'))
|
||||
}
|
||||
}
|
||||
else if (this.frm.doc.docstatus===0) {
|
||||
|
@ -242,7 +242,7 @@ def get_data():
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Opening Invoice Creation Tool",
|
||||
"description": _("Make Opening Sales and Purchase Invoices")
|
||||
"description": _("Create Opening Sales and Purchase Invoices")
|
||||
},
|
||||
]
|
||||
},
|
||||
|
@ -38,12 +38,10 @@ def get_data():
|
||||
"link": "List/Employee"
|
||||
},
|
||||
{
|
||||
"module_name": "Project",
|
||||
"_doctype": "Project",
|
||||
"module_name": "Projects",
|
||||
"color": "#8e44ad",
|
||||
"icon": "octicon octicon-rocket",
|
||||
"type": "link",
|
||||
"link": "List/Project"
|
||||
"type": "module",
|
||||
},
|
||||
{
|
||||
"module_name": "Issue",
|
||||
@ -71,6 +69,7 @@ def get_data():
|
||||
|
||||
# old
|
||||
{
|
||||
"label": _("Accounting"),
|
||||
"module_name": "Accounts",
|
||||
"color": "#3498db",
|
||||
"icon": "octicon octicon-repo",
|
||||
@ -151,12 +150,12 @@ def get_data():
|
||||
"hidden": 1
|
||||
},
|
||||
{
|
||||
"module_name": "Learn",
|
||||
"module_name": "Help",
|
||||
"color": "#FF888B",
|
||||
"icon": "octicon octicon-device-camera-video",
|
||||
"type": "module",
|
||||
"is_help": True,
|
||||
"label": _("Learn"),
|
||||
"label": _("Help"),
|
||||
"hidden": 1
|
||||
},
|
||||
{
|
||||
|
@ -70,7 +70,7 @@ def get_data():
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Accounts"),
|
||||
"label": _("Accounting"),
|
||||
"items": [
|
||||
{
|
||||
"type": "help",
|
@ -109,7 +109,7 @@ def get_data():
|
||||
]
|
||||
|
||||
for module, label, icon in (
|
||||
("accounts", _("Accounts"), "fa fa-money"),
|
||||
("accounts", _("Accounting"), "fa fa-money"),
|
||||
("stock", _("Stock"), "fa fa-truck"),
|
||||
("selling", _("Selling"), "fa fa-tag"),
|
||||
("buying", _("Buying"), "fa fa-shopping-cart"),
|
||||
|
@ -30,9 +30,9 @@ erpnext.LeadController = frappe.ui.form.Controller.extend({
|
||||
frappe.dynamic_link = {doc: doc, fieldname: 'name', doctype: 'Lead'}
|
||||
|
||||
if(!doc.__islocal && doc.__onload && !doc.__onload.is_customer) {
|
||||
this.frm.add_custom_button(__("Customer"), this.create_customer, __("Make"));
|
||||
this.frm.add_custom_button(__("Opportunity"), this.create_opportunity, __("Make"));
|
||||
this.frm.add_custom_button(__("Quotation"), this.make_quotation, __("Make"));
|
||||
this.frm.add_custom_button(__("Customer"), this.create_customer, __('Create'));
|
||||
this.frm.add_custom_button(__("Opportunity"), this.create_opportunity, __('Create'));
|
||||
this.frm.add_custom_button(__("Quotation"), this.make_quotation, __('Create'));
|
||||
}
|
||||
|
||||
if(!this.frm.doc.__islocal) {
|
||||
|
@ -47,11 +47,11 @@ frappe.ui.form.on("Opportunity", {
|
||||
frm.add_custom_button(__('Supplier Quotation'),
|
||||
function() {
|
||||
frm.trigger("make_supplier_quotation")
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
}
|
||||
|
||||
frm.add_custom_button(__('Quotation'),
|
||||
cur_frm.cscript.create_quotation, __("Make"));
|
||||
cur_frm.cscript.create_quotation, __('Create'));
|
||||
|
||||
if(doc.status!=="Quotation") {
|
||||
frm.add_custom_button(__('Lost'),
|
||||
|
@ -31,7 +31,7 @@ frappe.ui.form.on('Fee Structure', {
|
||||
|
||||
refresh: function(frm) {
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
@ -73,14 +73,14 @@ frappe.ui.form.on("Fees", {
|
||||
if(frm.doc.docstatus===1 && frm.doc.outstanding_amount>0) {
|
||||
frm.add_custom_button(__("Payment Request"), function() {
|
||||
frm.events.make_payment_request(frm);
|
||||
}, __("Make"));
|
||||
frm.page.set_inner_btn_group_as_primary(__("Make"));
|
||||
}, __('Create'));
|
||||
frm.page.set_inner_btn_group_as_primary(__('Create'));
|
||||
}
|
||||
if(frm.doc.docstatus===1 && frm.doc.outstanding_amount!=0) {
|
||||
frm.add_custom_button(__("Payment"), function() {
|
||||
frm.events.make_payment_entry(frm);
|
||||
}, __("Make"));
|
||||
frm.page.set_inner_btn_group_as_primary(__("Make"));
|
||||
}, __('Create'));
|
||||
frm.page.set_inner_btn_group_as_primary(__('Create'));
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
frappe.ui.form.on('Hotel Room Reservation', {
|
||||
refresh: function(frm) {
|
||||
if(frm.doc.docstatus == 1){
|
||||
frm.add_custom_button(__("Make Invoice"), ()=> {
|
||||
frm.add_custom_button(__('Create Invoice'), ()=> {
|
||||
frm.trigger("make_invoice");
|
||||
});
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ frappe.ui.form.on('Employee Advance', {
|
||||
&& (flt(frm.doc.paid_amount) < flt(frm.doc.advance_amount))
|
||||
&& frappe.model.can_create("Payment Entry")) {
|
||||
frm.add_custom_button(__('Payment'),
|
||||
function() { frm.events.make_payment_entry(frm); }, __("Make"));
|
||||
function() { frm.events.make_payment_entry(frm); }, __('Create'));
|
||||
}
|
||||
else if (
|
||||
frm.doc.docstatus === 1
|
||||
@ -43,7 +43,7 @@ frappe.ui.form.on('Employee Advance', {
|
||||
function() {
|
||||
frm.events.make_expense_claim(frm);
|
||||
},
|
||||
__("Make")
|
||||
__('Create')
|
||||
);
|
||||
}
|
||||
},
|
||||
|
@ -46,7 +46,7 @@ frappe.ui.form.on('Employee Loan', {
|
||||
|
||||
refresh: function (frm) {
|
||||
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");
|
||||
})
|
||||
}
|
||||
|
@ -29,8 +29,8 @@ frappe.ui.form.on('Employee Onboarding', {
|
||||
method: "erpnext.hr.doctype.employee_onboarding.employee_onboarding.make_employee",
|
||||
frm: frm
|
||||
});
|
||||
}, __("Make"));
|
||||
frm.page.set_inner_btn_group_as_primary(__("Make"));
|
||||
}, __('Create'));
|
||||
frm.page.set_inner_btn_group_as_primary(__('Create'));
|
||||
}
|
||||
if (frm.doc.docstatus === 1 && frm.doc.project) {
|
||||
frappe.call({
|
||||
|
@ -192,7 +192,7 @@ frappe.ui.form.on("Expense Claim", {
|
||||
&& (cint(frm.doc.total_amount_reimbursed) < cint(frm.doc.total_sanctioned_amount))
|
||||
&& frappe.model.can_create("Payment Entry")) {
|
||||
frm.add_custom_button(__('Payment'),
|
||||
function() { frm.events.make_payment_entry(frm); }, __("Make"));
|
||||
function() { frm.events.make_payment_entry(frm); }, __('Create'));
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -15,7 +15,7 @@ frappe.ui.form.on("Job Offer", {
|
||||
refresh: function (frm) {
|
||||
if ((!frm.doc.__islocal) && (frm.doc.status == 'Accepted')
|
||||
&& (frm.doc.docstatus === 1) && (!frm.doc.__onload || !frm.doc.__onload.employee)) {
|
||||
frm.add_custom_button(__('Make Employee'),
|
||||
frm.add_custom_button(__('Create Employee'),
|
||||
function () {
|
||||
erpnext.job_offer.make_employee(frm);
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ frappe.ui.form.on('Loan', {
|
||||
|
||||
refresh: function (frm) {
|
||||
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");
|
||||
})
|
||||
}
|
||||
@ -54,7 +54,7 @@ frappe.ui.form.on('Loan', {
|
||||
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)) {
|
||||
frm.add_custom_button(__('Make Repayment Entry'), function() {
|
||||
frm.add_custom_button(__('Create Repayment Entry'), function() {
|
||||
frm.trigger("make_repayment_entry");
|
||||
})
|
||||
}
|
||||
@ -157,7 +157,7 @@ frappe.ui.form.on('Loan', {
|
||||
}
|
||||
|
||||
dialog.show()
|
||||
dialog.set_primary_action(__('Make Repayment Entry'), function() {
|
||||
dialog.set_primary_action(__('Create Repayment Entry'), function() {
|
||||
frm.values = dialog.get_values();
|
||||
if(frm.values) {
|
||||
_make_repayment_entry(frm, dialog.fields_dict.payments.grid.get_selected_children());
|
||||
|
@ -20,8 +20,8 @@ frappe.ui.form.on("Vehicle Log", {
|
||||
if(frm.doc.docstatus == 1) {
|
||||
frm.add_custom_button(__('Expense Claim'), function() {
|
||||
frm.events.expense_claim(frm)
|
||||
}, __("Make"));
|
||||
frm.page.set_inner_btn_group_as_primary(__("Make"));
|
||||
}, __('Create'));
|
||||
frm.page.set_inner_btn_group_as_primary(__('Create'));
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -19,7 +19,7 @@ def execute(filters=None):
|
||||
return columns, data, None, chart
|
||||
|
||||
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",
|
||||
_("Log") + ":Link/Vehicle Log:100", _("Odometer") + ":Int:80",
|
||||
_("Date") + ":Date:100", _("Fuel Qty") + ":Float:80",
|
||||
|
@ -44,13 +44,13 @@ erpnext.maintenance.MaintenanceSchedule = frappe.ui.form.Controller.extend({
|
||||
});
|
||||
}, __("Get items from"));
|
||||
} 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({
|
||||
method: "erpnext.maintenance.doctype.maintenance_schedule.maintenance_schedule.make_maintenance_visit",
|
||||
source_name: me.frm.doc.name,
|
||||
frm: me.frm
|
||||
})
|
||||
}, __("Make"));
|
||||
});
|
||||
}, __('Create'));
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -39,14 +39,14 @@ frappe.ui.form.on('Production Plan', {
|
||||
&& frm.doc.status != 'Completed') {
|
||||
frm.add_custom_button(__("Work Order"), ()=> {
|
||||
frm.trigger("make_work_order");
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
}
|
||||
|
||||
if (frm.doc.docstatus === 1 && frm.doc.mr_items
|
||||
&& !in_list(['Material Requested', 'Completed'], frm.doc.status)) {
|
||||
frm.add_custom_button(__("Material Request"), ()=> {
|
||||
frm.trigger("make_material_request");
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
}
|
||||
|
||||
frm.trigger("material_requirement");
|
||||
|
@ -115,6 +115,7 @@ frappe.ui.form.on("Work Order", {
|
||||
if (frm.doc.docstatus === 1
|
||||
&& frm.doc.operations && frm.doc.operations.length
|
||||
&& frm.doc.qty != frm.doc.material_transferred_for_manufacturing) {
|
||||
|
||||
const not_completed = frm.doc.operations.filter(d => {
|
||||
if(d.status != 'Completed') {
|
||||
return true;
|
||||
@ -122,7 +123,7 @@ frappe.ui.form.on("Work Order", {
|
||||
});
|
||||
|
||||
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")
|
||||
}).addClass('btn-primary');
|
||||
}
|
||||
@ -148,7 +149,7 @@ frappe.ui.form.on("Work Order", {
|
||||
|
||||
if (frm.doc.status == "Completed" &&
|
||||
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");
|
||||
});
|
||||
}
|
||||
@ -554,7 +555,7 @@ erpnext.work_order = {
|
||||
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) {
|
||||
|
@ -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.v11_0.set_missing_gst_hsn_code
|
||||
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
|
||||
|
0
erpnext/patches/v12_0/__init__.py
Normal file
0
erpnext/patches/v12_0/__init__.py
Normal 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'))
|
12
erpnext/patches/v12_0/rename_learn_to_help.py
Normal file
12
erpnext/patches/v12_0/rename_learn_to_help.py
Normal 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'))
|
@ -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()
|
@ -41,12 +41,12 @@ frappe.ui.form.on("Timesheet", {
|
||||
refresh: function(frm) {
|
||||
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){
|
||||
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");
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
@ -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();
|
||||
if(!args) return;
|
||||
dialog.hide();
|
||||
|
@ -21,13 +21,13 @@ frappe.ui.form.on("Communication", {
|
||||
frappe.confirm(__(confirm_msg, [__("Lead")]), () => {
|
||||
frm.trigger('make_lead_from_communication');
|
||||
})
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
|
||||
frm.add_custom_button(__("Opportunity"), () => {
|
||||
frappe.confirm(__(confirm_msg, [__("Opportunity")]), () => {
|
||||
frm.trigger('make_opportunity_from_communication');
|
||||
})
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -108,7 +108,7 @@ frappe.ui.form.on("Customer", {
|
||||
|
||||
frm.add_custom_button(__('Pricing Rule'), function () {
|
||||
erpnext.utils.make_pricing_rule(frm.doc.doctype, frm.doc.name);
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
|
||||
// indicator
|
||||
erpnext.utils.set_party_dashboard_indicators(frm);
|
||||
|
@ -52,7 +52,7 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
|
||||
if(doc.docstatus == 1 && doc.status!=='Lost') {
|
||||
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.cscript['Make Sales Order'], __("Make"));
|
||||
cur_frm.cscript['Make Sales Order'], __('Create'));
|
||||
}
|
||||
|
||||
if(doc.status!=="Ordered") {
|
||||
@ -63,10 +63,10 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
|
||||
if(!doc.auto_repeat) {
|
||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
||||
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) {
|
||||
|
@ -133,61 +133,61 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
|
||||
// delivery note
|
||||
if(flt(doc.per_delivered, 6) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1 && allow_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'),
|
||||
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
|
||||
if(flt(doc.per_billed, 6) < 100) {
|
||||
this.frm.add_custom_button(__('Invoice'),
|
||||
function() { me.make_sales_invoice() }, __("Make"));
|
||||
function() { me.make_sales_invoice() }, __('Create'));
|
||||
}
|
||||
|
||||
// material request
|
||||
if(!doc.order_type || ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1
|
||||
&& flt(doc.per_delivered, 6) < 100) {
|
||||
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'),
|
||||
function() { me.make_raw_material_request() }, __("Make"));
|
||||
function() { me.make_raw_material_request() }, __('Create'));
|
||||
}
|
||||
|
||||
// make purchase order
|
||||
if(flt(doc.per_delivered, 6) < 100 && allow_purchase) {
|
||||
this.frm.add_custom_button(__('Purchase Order'),
|
||||
function() { me.make_purchase_order() }, __("Make"));
|
||||
function() { me.make_purchase_order() }, __('Create'));
|
||||
}
|
||||
|
||||
// payment request
|
||||
if(flt(doc.per_billed)==0) {
|
||||
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'),
|
||||
function() { me.make_payment_entry() }, __("Make"));
|
||||
function() { me.make_payment_entry() }, __('Create'));
|
||||
}
|
||||
|
||||
// maintenance
|
||||
if(flt(doc.per_delivered, 2) < 100 &&
|
||||
["Sales", "Shopping Cart"].indexOf(doc.order_type)===-1) {
|
||||
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'),
|
||||
function() { me.make_maintenance_schedule() }, __("Make"));
|
||||
function() { me.make_maintenance_schedule() }, __('Create'));
|
||||
}
|
||||
|
||||
// project
|
||||
if(flt(doc.per_delivered, 2) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1 && allow_delivery) {
|
||||
this.frm.add_custom_button(__('Project'),
|
||||
function() { me.make_project() }, __("Make"));
|
||||
function() { me.make_project() }, __('Create'));
|
||||
}
|
||||
|
||||
if(!doc.auto_repeat) {
|
||||
this.frm.add_custom_button(__('Subscription'), function() {
|
||||
erpnext.utils.make_subscription(doc.doctype, doc.name)
|
||||
}, __("Make"))
|
||||
}, __('Create'))
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -293,7 +293,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
|
||||
}
|
||||
});
|
||||
},
|
||||
primary_action_label: __('Make')
|
||||
primary_action_label: __('Create')
|
||||
});
|
||||
d.show();
|
||||
}
|
||||
@ -391,7 +391,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
|
||||
}
|
||||
});
|
||||
},
|
||||
primary_action_label: __('Make')
|
||||
primary_action_label: __('Create')
|
||||
});
|
||||
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"},
|
||||
]
|
||||
});
|
||||
|
||||
|
@ -52,7 +52,7 @@ frappe.ui.form.on("Company", {
|
||||
frm.toggle_enable("default_currency", (frm.doc.__onload &&
|
||||
!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");
|
||||
});
|
||||
|
||||
@ -74,7 +74,7 @@ frappe.ui.form.on("Company", {
|
||||
|
||||
frm.add_custom_button(__('Default Tax Template'), function() {
|
||||
frm.trigger("make_default_tax_template");
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
}
|
||||
|
||||
erpnext.company.set_chart_of_accounts_options(frm.doc);
|
||||
|
@ -104,16 +104,16 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
|
||||
if (!doc.is_return && doc.status!="Closed") {
|
||||
if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1)
|
||||
this.frm.add_custom_button(__('Installation Note'), function() {
|
||||
me.make_installation_note() }, __("Make"));
|
||||
me.make_installation_note() }, __('Create'));
|
||||
|
||||
if (doc.docstatus==1) {
|
||||
this.frm.add_custom_button(__('Sales Return'), function() {
|
||||
me.make_sales_return() }, __("Make"));
|
||||
me.make_sales_return() }, __('Create'));
|
||||
}
|
||||
|
||||
if (doc.docstatus==1) {
|
||||
this.frm.add_custom_button(__('Delivery Trip'), function() {
|
||||
me.make_delivery_trip() }, __("Make"));
|
||||
me.make_delivery_trip() }, __('Create'));
|
||||
}
|
||||
|
||||
if(doc.docstatus==0 && !doc.__islocal) {
|
||||
@ -121,11 +121,11 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
|
||||
frappe.model.open_mapped_doc({
|
||||
method: "erpnext.stock.doctype.delivery_note.delivery_note.make_packing_slip",
|
||||
frm: me.frm
|
||||
}) }, __("Make"));
|
||||
}) }, __('Create'));
|
||||
}
|
||||
|
||||
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) {
|
||||
@ -170,7 +170,7 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
|
||||
|
||||
if(!from_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) {
|
||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
||||
erpnext.utils.make_subscription(doc.doctype, doc.name)
|
||||
}, __("Make"))
|
||||
}, __('Create'))
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -66,17 +66,17 @@ frappe.ui.form.on("Item", {
|
||||
if(frm.doc.variant_based_on==="Item Attribute") {
|
||||
frm.add_custom_button(__("Single Variant"), function() {
|
||||
erpnext.item.show_single_variant_dialog(frm);
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
frm.add_custom_button(__("Multiple Variants"), function() {
|
||||
erpnext.item.show_multiple_variants_dialog(frm);
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
} else {
|
||||
frm.add_custom_button(__("Variant"), function() {
|
||||
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) {
|
||||
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();
|
||||
if(!data) return;
|
||||
|
||||
@ -424,7 +424,7 @@ $.extend(erpnext.item, {
|
||||
lengths.push(selected_attributes[key].length);
|
||||
});
|
||||
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();
|
||||
} else {
|
||||
let no_of_combinations = lengths.reduce((a, b) => a * b, 1);
|
||||
@ -455,7 +455,7 @@ $.extend(erpnext.item, {
|
||||
].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();
|
||||
|
||||
me.multiple_variant_dialog.hide();
|
||||
@ -587,11 +587,11 @@ $.extend(erpnext.item, {
|
||||
}
|
||||
|
||||
var d = new frappe.ui.Dialog({
|
||||
title: __("Make Variant"),
|
||||
title: __('Create Variant'),
|
||||
fields: fields
|
||||
});
|
||||
|
||||
d.set_primary_action(__("Make"), function() {
|
||||
d.set_primary_action(__('Create'), function() {
|
||||
var args = d.get_values();
|
||||
if(!args) return;
|
||||
frappe.call({
|
||||
|
@ -54,40 +54,40 @@ frappe.ui.form.on('Material Request', {
|
||||
// make
|
||||
if (frm.doc.material_request_type === "Material Transfer") {
|
||||
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") {
|
||||
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") {
|
||||
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") {
|
||||
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") {
|
||||
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") {
|
||||
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") {
|
||||
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
|
||||
frm.add_custom_button(__('Stop'),
|
||||
|
@ -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(__('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) {
|
||||
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) {
|
||||
cur_frm.add_custom_button(__('Subscription'), function() {
|
||||
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'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ frappe.ui.form.on('Stock Entry', {
|
||||
refresh: function(frm) {
|
||||
if(!frm.doc.docstatus) {
|
||||
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() {
|
||||
var mr = frappe.model.get_new_doc('Material Request');
|
||||
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')) {
|
||||
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");
|
||||
});
|
||||
}
|
||||
@ -710,7 +710,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
||||
excise = locals['Journal Entry'][excise];
|
||||
excise.voucher_type = 'Excise Entry';
|
||||
frappe.set_route('Form', 'Journal Entry', excise.name);
|
||||
}, __("Make"));
|
||||
}, __('Create'));
|
||||
},
|
||||
|
||||
items_add: function(doc, cdt, cdn) {
|
||||
|
@ -62,7 +62,7 @@ def get_help_messages():
|
||||
doctype='Lead',
|
||||
title=_('Create 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',
|
||||
domain=('Manufacturing', 'Retail', 'Services', 'Distribution'),
|
||||
target=3
|
||||
@ -71,7 +71,7 @@ def get_help_messages():
|
||||
doctype='Quotation',
|
||||
title=_('Create customer quotes'),
|
||||
description=_('Quotations are proposals, bids you have sent to your customers'),
|
||||
action=_('Make Quotation'),
|
||||
action=_('Create Quotation'),
|
||||
route='List/Quotation',
|
||||
domain=('Manufacturing', 'Retail', 'Services', 'Distribution'),
|
||||
target=3
|
||||
@ -79,8 +79,8 @@ def get_help_messages():
|
||||
frappe._dict(
|
||||
doctype='Sales Order',
|
||||
title=_('Manage your orders'),
|
||||
description=_('Make Sales Orders to help you plan your work and deliver on-time'),
|
||||
action=_('Make Sales Order'),
|
||||
description=_('Create Sales Orders to help you plan your work and deliver on-time'),
|
||||
action=_('Create Sales Order'),
|
||||
route='List/Sales Order',
|
||||
domain=('Manufacturing', 'Retail', 'Services', 'Distribution'),
|
||||
target=3
|
||||
@ -89,7 +89,7 @@ def get_help_messages():
|
||||
doctype='Purchase Order',
|
||||
title=_('Create Purchase Orders'),
|
||||
description=_('Purchase orders help you plan and follow up on your purchases'),
|
||||
action=_('Make Purchase Order'),
|
||||
action=_('Create Purchase Order'),
|
||||
route='List/Purchase Order',
|
||||
domain=('Manufacturing', 'Retail', 'Services', 'Distribution'),
|
||||
target=3
|
||||
@ -98,7 +98,7 @@ def get_help_messages():
|
||||
doctype='User',
|
||||
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'),
|
||||
action=_('Make User'),
|
||||
action=_('Create User'),
|
||||
route='List/User',
|
||||
domain=('Manufacturing', 'Retail', 'Services', 'Distribution'),
|
||||
target=3
|
||||
@ -107,7 +107,7 @@ def get_help_messages():
|
||||
doctype='Timesheet',
|
||||
title=_('Add Timesheets'),
|
||||
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',
|
||||
domain=('Services',),
|
||||
target=5
|
||||
@ -116,7 +116,7 @@ def get_help_messages():
|
||||
doctype='Student',
|
||||
title=_('Add Students'),
|
||||
description=_('Students are at the heart of the system, add all your students'),
|
||||
action=_('Make Student'),
|
||||
action=_('Create Student'),
|
||||
route='List/Student',
|
||||
domain=('Education',),
|
||||
target=5
|
||||
@ -125,7 +125,7 @@ def get_help_messages():
|
||||
doctype='Student Batch',
|
||||
title=_('Group your students in batches'),
|
||||
description=_('Student Batches help you track attendance, assessments and fees for students'),
|
||||
action=_('Make Student Batch'),
|
||||
action=_('Create Student Batch'),
|
||||
route='List/Student Batch',
|
||||
domain=('Education',),
|
||||
target=3
|
||||
@ -134,7 +134,7 @@ def get_help_messages():
|
||||
doctype='Employee',
|
||||
title=_('Create Employee Records'),
|
||||
description=_('Create Employee records to manage leaves, expense claims and payroll'),
|
||||
action=_('Make Employee'),
|
||||
action=_('Create Employee'),
|
||||
route='List/Employee',
|
||||
target=3
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user