Not allowed to enable Allow on Submit for standard fields

i tried to modify Allow on Submit for standard fields as an administrator but also prevent me is this feature prevent all users or normal user only and also i switched to developer mode and not working also i have some fields have to be modified after submitting even i do that on my risk

@rmehta @nabinhait @Ranjith @sagar
Any suggest

@Alaa_Badri
This is by design. If this validation is removed then one can edit calculation fields, that is wrong.

Alternate way.
You can hide standard field and add custom field.

2 Likes

Dear @kolate_sambhaji
Thanks for your support
i’m already use this alternate way for some field but for other like Item code field it’s not allowed to be hidden and i think this will cause some problem in the transaction so i need to allow it on the native field to avoid any potential problem
i hope this to be clear and we can find solution for this case

Any update Guys

Dear @kolate_sambhaji
Any update

@Alaa_Badri Standard field is not editable after submit, you can use alternative way.

Dear @kolate_sambhaji
what is your suggesting alternative way

This is alternative way.

This is will be correct with item table and not effect on the recent transactions

@kolate_sambhaji

As Mentioned in Form Scripts in frappe docs. you can do the following in the script.


so my solution to you is to put on refresh trigger this line
frm.set_df_property(‘items’, ‘allow_on_submit’, 1)
where ‘items’ is my table name.

1 Like

The proposed custom script from AlinYellow addresses parent doctype fields. How do you do something similar to for child doctype fields?

Use Edit Doctype options it will work

Edit Doctype does not work for standard fields on child doctypes. You get the same error as the one from standard fields on parent doctypes:

Not allowed to enable Allow on Submit for standard fields

To edit source files for standard doctypes from the UI, make sure your site is configured for developer_mode:

https://frappeframework.com/docs/v13/user/en/guides/app-development/how-enable-developer-mode-in-frappe

Note that all changes made in this way will have to be manually re-merged on future upgrades.

Thanks, Peterg! I tested this and I see that it works in developer mode.

How could I do this through code in an app instead of through the UI? I’m making this change to a child doctype – specifically Payment Schedule (field: due_date).

I’m not aware of any way to override a standard doctype’s fields via an app. It’s not a matter of child vs. parent doctypes. The method AlinYellow describes in this thread doesn’t actually work for parent doctype fields either, at least not as far as I can tell. The set_df_property method is pure frontend, but allow_on_submit is checked on the backend.

It appears that you can do what you want to do with a Property Setter doc. I’d be careful, though. Manually creating Property Setters is very hacky, and there’s a good chance you’ll wreck the integrity of your data. Submitted documents aren’t really meant to be edited.