"Custom?" field for new DocType always disabled with developer_mode enabled

Hi everybody. I just create a new app, a new site, added the app to the site and set developer_mode to 1 and not able to uncheck the “Custom?” option to save DocType to the created app. It happened with my actual site and app, but I just recreate the case from the scratch, with a new site and app, and still not working.

It seems to be a JS issue, because if I inspect the html checkbox to remove the hidden and disabled, I check, save and the backend does not complain and it works perfect. But I need to do that hack to have it working. Could be a bug?

When I create the DocType the “Custom?” is disabled as expected, but not able to uncheck it (documentation says “Custom?: This field will be checked by default when adding Custom Doctype.”) but when I edit the DocType is still disabled:

Thank you very much for your help and good work! :slight_smile:

1 Like

How did you enable the checkbox for the “Custom” field. I created an app as well and some doctypes but I can’t create a doctype that does not have the “Custom” checkbox checked and so the .py etc files are not created. I want to uncheck the checkbox but I can’t and when I try creating a doctype I can’t uncheck it.

What was your hack. give me a screen shot.

Are you logged in as Administrator?

1 Like

Hi Draedon, first of all you need having permissions to manage the custom field, but if yet not disabled like in my case, just open your browser developer options, then inspect that element, you will find two fields, one visible (the one disabled) and together, one hidden (hidden class if I do not remember bad), just remove the hidden class it will become visible, then uncheck normally, and save :slight_smile:
Hope this helps, if not I will try to do more detailed instructions later today or tomorrow.

Thanks

I am trying to do this using the Administrator user of erpnext/frappe.

I can see the checkbox but it is disabled (I can not check or uncheck it).

Can you send me a screenshot of how you change the document using Inspection?

Also, I looked at the doctype in the doctype screen and see that the “custom” field is set to only allow entry once.

Maybe we can determine the code that uses the field when determining whether to generate the files and make the necessary changes so that the files get generated when in developer mode

Ron Clark
President

Draedon Consulting Corp.
403-968-9212 (VoIP)
587-889-9215 (cell)

Hi again Draedon, I hope this video helps you :slight_smile:

https://ufile.io/bq4w31fh

you need to set developer_mode to 1 in your site_config
bench --site [site name] set-config developer_mode 1

2 Likes

Hi Jotun, thanks for you response. Yes it is. The full process was: “create a new app, a new site, add the app to the site and set developer_mode to 1” :slight_smile:

No Joelios, that was the issue! It is needed to be logged as “Administrator” user.

2 Likes