You can't set options for field 'x'

Initial point of clarification:
I originally posted my issue as a follow up post to this issue:
https://discuss.frappe.io/t/you-can-t-set-options-for-field-status/89407
But after ankush responded, I finally realized that the OP was reporting his inability to change “Status” field. I’m not trying to change “Status”. The issue I’m having happens when I try to customize form for ANY Select field options on any standard doctype. My own issue details follow:


Issue Details
I AM trying to customize a doctype form by adding another word to the options. Specifically I’m trying to change the quotation.order_type options. I get the error “You can’t set options for field ‘Order Type’”.

I tried customizing form to change the options for “Default Material Request Type” on “Item” and I get the error “You can’t set options for field ‘Default Material Request Type’.”

It appears that I’m unable to customize Options on any Select field on Customize Form for any standard doctype.

I get these errors on an ErpNext instance running v13.28
However, customization works fine on an instance running v13.18
Obviously, there could be something else different between the instances but I don’t know what it is that would be causing this issue.

Ideas?

Customizing the options for a ‘Select’ DocField is definitely allowed in v13.8. I just tested.

I don’t have a production environment on a higher version. But I have a few development environments. I’ll try to upgrade one of those to v13.28, and see if I can duplicate.

Is the "You can't set options for field ..." the precise text?
If so, should be possible to search the Python code for this phrase. Identify the file name. Then review its git commits, to learn exactly when this change was introduced.

@brian_pond

See Ankush’s response here:
https://discuss.frappe.io/t/you-can-t-set-options-for-field-status/89407/13

Ahhh, I see; thanks! The initial commit was for v14. At some point, it must have been backported into v13. :+1:

For what it’s worth, I agree with this change. One of my customers once broke their ERPNext, by adding new Options for DocTypes like Journal Entries and Sales Invoices. This change prevents such problems.

But this would hinder from customizing other fields which are less prone to cause issues.

Say for example I was trying to add some options in address_type. I does not allow now. I am not sure if such simple fields would crash erpnext.

This is a must have option in my opinion.

Hi Brian, is this an indication that it’s gonna be impossible to add a new option in all select doctypes? Because I could really use this feature right now. It’s crucial

Hi @zella-1987

I don’t have any new information to share. I’m still using Frappe/ERPnext v13.8. But also I rarely use the Customize feature (I’m maintaining my own forks instead).

I think the best way to find out, is to try! Click Customize, add your Options, and see what happens?