mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-23 21:22:42 +01:00
Merge pull request #53249 from nishkagosalia/purchase-order-button-fix
This commit is contained in:
@@ -57,27 +57,33 @@ $.extend(erpnext, {
|
||||
}
|
||||
|
||||
fields.forEach((field) => {
|
||||
frm.fields_dict[child_name].grid.update_docfield_property(field, "hidden", hide_fields);
|
||||
if (frm.fields_dict[child_name].get_field(field)) {
|
||||
frm.fields_dict[child_name].grid.update_docfield_property(field, "hidden", hide_fields);
|
||||
|
||||
frm.fields_dict[child_name].grid.update_docfield_property(
|
||||
field,
|
||||
"in_list_view",
|
||||
hide_fields ? 0 : 1
|
||||
);
|
||||
|
||||
if (
|
||||
frm.doc.doctype === "Subcontracting Receipt" &&
|
||||
!["add_serial_batch_for_rejected_qty", "rejected_serial_and_batch_bundle"].includes(field)
|
||||
) {
|
||||
frm.fields_dict["supplied_items"].grid.update_docfield_property(field, "hidden", hide_fields);
|
||||
|
||||
frm.fields_dict["supplied_items"].grid.update_docfield_property(
|
||||
frm.fields_dict[child_name].grid.update_docfield_property(
|
||||
field,
|
||||
"in_list_view",
|
||||
hide_fields ? 0 : 1
|
||||
);
|
||||
|
||||
frm.fields_dict["supplied_items"].grid.reset_grid();
|
||||
if (
|
||||
frm.doc.doctype === "Subcontracting Receipt" &&
|
||||
!["add_serial_batch_for_rejected_qty", "rejected_serial_and_batch_bundle"].includes(field)
|
||||
) {
|
||||
frm.fields_dict["supplied_items"].grid.update_docfield_property(
|
||||
field,
|
||||
"hidden",
|
||||
hide_fields
|
||||
);
|
||||
|
||||
frm.fields_dict["supplied_items"].grid.update_docfield_property(
|
||||
field,
|
||||
"in_list_view",
|
||||
hide_fields ? 0 : 1
|
||||
);
|
||||
|
||||
frm.fields_dict["supplied_items"].grid.reset_grid();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user