This question has been flagged

I have a button that sets the value of a field it's python method. At the web client, I'd like to run some js when the field loads with the changed data, but I am unsure of where to modify. Since the value is changed server side, it is kind of opposite of onchange, which would do something when the user modifies the field at the client. I'm sure there is a standard solution to this, but I'm hoping someone can steer me in the right direction.

Avatar
Discard
Author

There is apparently no standard solution to this in fact. Tracing the client side code back suggests that on button click, the form saves it's data, then does the write in the button click action, then reloads, but does not ever set the _changes property client side or raise a fields_changed event. You can actually test this by creating a button to set a field value, then putting an onchange method on the field in python code. The field will update on button click, but the onchange won't fire. The best solution I've found so far is to use the OCA module web_notify to send an info notification in the action call.