fix: Table row in dialog should not have delete row option

This commit is contained in:
nishkagosalia
2026-04-06 19:09:20 +05:30
parent 6ee4b46be0
commit eb89903dec
3 changed files with 7 additions and 4 deletions

View File

@@ -472,6 +472,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
frappe.msgprint(__("No pending payment schedules available."));
return;
}
schedules.forEach((schedule) => (schedule.__checked = 1));
const dialog = new frappe.ui.Dialog({
title: __("Select Payment Schedule"),
@@ -481,6 +482,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
fieldname: "payment_schedules",
label: __("Payment Schedules"),
cannot_add_rows: true,
cannot_delete_rows: true,
in_place_edit: false,
data: schedules,
fields: [
@@ -526,7 +528,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
});
return;
}
console.log(selected);
dialog.hide();
let me = this;
const payment_request_type = ["Sales Order", "Sales Invoice"].includes(this.frm.doc.doctype)

View File

@@ -1405,6 +1405,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex
make_raw_material_request_dialog(r) {
var me = this;
r.message.forEach((item) => (item.__checked = 1));
var fields = [
{ fieldtype: "Check", fieldname: "include_exploded_items", label: __("Include Exploded Items") },
{
@@ -1415,7 +1416,8 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex
{
fieldtype: "Table",
fieldname: "items",
description: __("Select BOM, Qty and For Warehouse"),
description: __("Finished Goods"),
cannot_delete_rows: true,
fields: [
{
fieldtype: "Read Only",

View File

@@ -2066,14 +2066,14 @@ def get_work_order_items(sales_order: str, for_raw_material_request: int = 0):
if not pending_qty:
pending_qty = stock_qty * overproduction_percentage_for_sales_order
if pending_qty > 0 and i.item_code not in product_bundle_parents:
if pending_qty > 0 and i.item_code not in product_bundle_parents and bom:
items.append(
dict(
name=i.name,
item_code=i.item_code,
item_name=i.item_name,
description=i.description,
bom=bom or "",
bom=bom,
warehouse=i.warehouse,
pending_qty=pending_qty,
required_qty=pending_qty if for_raw_material_request else 0,