Change name in the menu list

Hi,

How to change the name in the menu

in the image we have to change Import to Import/Export

You can find this button is list_view.js file in frappe
follow this path apps/frappe/frappe/public/js/frappe/list/list_view.js
Then search for import button and edit it

image

Then bench build

1 Like

@OmarJaber

thanks its working

If i need to add button near the menu list where and how can i add

1 Like

You can insert new button in the same file where you want in the init_menu function

Hi,
What if one wanted to change a menu item e.g. In a purchase order, change “Receipt” to “Receive Goods”

Try this (edited) :

frappe.ui.form.on("Purchase Order",{
setup: function(frm) {
    $.extend(frm.cscript, new CustomPOController({frm: frm}));
}
});

CustomPOController = erpnext.buying.PurchaseOrderController.extend({
    refresh: function(doc, dt, dn) {
        var me = this;
        this._super(doc, dt, dn);
        this.frm.custom_buttons['Receive Goods'] = this.frm.custom_buttons['Receipt'];
        delete this.frm.custom_buttons['Receipt'];
    }
});
2 Likes

Hi,
I tried placing this under custom scripts, reloaded bench but no change:

Anything in the console?

I see no error or warnings…

Hi,
This worked after running
$ bench clear-cache
I was initially just reloading through the Admin UI. Thanks!

1 Like