Avoid recursive OnChange event
Bug #1098948 reported by
Yann Papouin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Confirmed
|
Wishlist
|
OpenERP's Framework R&D |
Bug Description
In a custom module that I'm trying to develop, there are three fields with a OnChange event that affects each of the other fields.
The main issue is that the OnChange event is propagated threw all fields again and again until a balance is found (the value does not change, so the OnChange event is not triggered).
Is there a way to avoid the OnChange "butterfly effect" ?
I tried with a custom tag variable passed in the context dictionnary, but apparently this custom context is lost when exiting the OnChange event.
Changed in openobject-server: | |
status: | New → Confirmed |
importance: | Undecided → Wishlist |
assignee: | nobody → OpenERP's Framework R&D (openerp-dev-framework) |
To post a comment you must log in.
Yann,
I am sure you can handle this within your code.
By design, if value is changed (disregard to manual way or from the onchange of another field); onchange trigger has to fire.
What you can do here is call another onchange with special context and make specific adjustments.
You can also manage this by value based call to onchanges.
If you wish, you can share your example.
Thanks.