Disable select group cost center

How to Disable select group cost center in Material Request?

1 Like

I have the same kind of issue. “Cost Centre” groups are also being populated in the drop-down of the “Cost Centre” field. Currently what is happening that the user selects “cost centre” group instead of “cost centre” by mistake, and the system then throws errors for the selection of the group.

How to restrict group items from the population in the “Cost Centre” field?

You can add filters (exclude group cost center) to that specific input.
For all cost center input, you can set standard queries in hooks

Thanks @SubhajitDey. Can you please give me more details on how I can add filters to that specific input to exclude the group cost center?

You can check erpnext. Example is in sales_invoice.js.

Bear in mind that you should also validate the input based on your filter/custom query