How to update values of any particular field which has Allow on Submit as true

Hello there,

For eg: I want to update the rate field of Sales Order Item, on a button click, even after the Sales Order is submitted.

The question here is to change value of any field, for which “Allow on Submit” is set as true, and once that record is submitted, how could I change the value of that particular field through python code, any way to force update the value?

Thanks in advance

Found a way:

With this flag “ignore_validate_update_after_submit” could achieve.

sale_doc = frappe.get_doc(“Sales Order”, item[‘so_name’])
s.rate = new_value
sale_doc.flags.ignore_validate_update_after_submit = True