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 17a6a9b036
commit 4d8f833cc9
2 changed files with 6 additions and 0 deletions

View File

@ -578,6 +578,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'