fix: Remove Add Row and Delete Row options for Packed Items table

This commit is contained in:
GangaManoj
2021-09-01 15:20:40 +05:30
parent 361605a2b6
commit 4538071e0d
2 changed files with 6 additions and 0 deletions

View File

@@ -566,6 +566,9 @@ frappe.ui.form.on('Sales Invoice', {
frm.add_fetch('payment_term', 'invoice_portion', 'invoice_portion');
frm.add_fetch('payment_term', 'description', 'description');
frm.set_df_property('packed_items', 'cannot_add_rows', true);
frm.set_df_property('packed_items', 'cannot_delete_rows', true);
frm.set_query("account_for_change_amount", function() {
return {
filters: {

View File

@@ -43,6 +43,9 @@ frappe.ui.form.on("Sales Order", {
}
}
});
frm.set_df_property('packed_items', 'cannot_add_rows', true);
frm.set_df_property('packed_items', 'cannot_delete_rows', true);
},
refresh: function(frm) {
if(frm.doc.docstatus === 1 && frm.doc.status !== 'Closed'