Dear All ,
I have project in list view while getting delivery note pop up from get items from button in sales invoice
i want to see full name of list view field(‘Name’) and increase width of pop-up. my js code is below
frappe.provide("erpnext.accounts");
erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.extend({
refresh: function(doc) {
const me = this;
if (cint(doc.docstatus==0) && cur_frm.page.current_view_name!=="pos" && !doc.is_return) {
this.frm.cscript.sales_order_btn();
//this.frm.cscript.delivery_note_btn();
this.frm.cscript.delivery_notes_btn();
this.frm.cscript.quotation_btn();
}
},
delivery_notes_btn: function() {
var me = this;
this.$delivery_notes_btn = this.frm.add_custom_button(__('Delivery Note'),
function() {
erpnext.utils.map_current_doc({
method: "erpnext.stock.doctype.delivery_note.delivery_note.make_sales_invoice",
source_doctype: "Delivery Note",
target: me.frm,
date_field: "posting_date",
setters: {
customer: me.frm.doc.customer || undefined,
project: me.frm.doc.project || undefined
},
get_query: function() {
var filters = {
docstatus: 1,
company: me.frm.doc.company,
is_return: 0
};
if(me.frm.doc.customer) filters["customer"] = me.frm.doc.customer;
if(me.frm.doc.project) filters["project"] = me.frm.doc.project;
return {
query: "one_fm.one_fm.doctype.sales_invoice.sales_invoice_custom.get_delivery_notes_to_be_billed",
filters: filters
};
}
});
}, __("Get items from"));
}
});
$.extend(cur_frm.cscript, new erpnext.accounts.SalesInvoiceController({frm: cur_frm}));
Thanks,
Abrar