Download button in child table after submitting the document (hide and show)

Hello;

The download button in the items child table in the sales invoice, sales order, … etc, how I can make it available even after submit the document? As currently is only available if the document is Draf.

Regards
Bilal

This presently cannot be done. However, in Sales order you can use the “Update Items” button to add/delete/edit items.

Hello @michelle

From the code is not possible? Just direct me to the file and I will modify it.

Regarding to Update Items: Where I can find it? And this is only available for Sales Order?

Regards
Bilal

A search on ‘add multiple button’ turned up these learning case examples

The above all suggest this js code is what to check frappe/frappe/public/js/frappe/form/grid.js at develop · frappe/frappe · GitHub

In Grid.js you will find method setup_download, which gets triggered on clicking Download button.
You can call this method in custom js by
cur_frm.get_field("items").grid.setup_download
Note: you wont be able to use the method as the button id will be different.
copy the code in your custom js and it will work

Here ,

var me = this;
this stands for → cur_frm.fields_dict['items'].grid

2 Likes

you can see this, may helps you.

This one works for me

frappe.ui.form.on('Training Plan', {
    setup: function(frm){
        frm.get_docfield("items").allow_bulk_edit = 1;
    },
});
1 Like