summaryrefslogtreecommitdiff
path: root/doc/reference/javascript.rst
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2014-12-05 17:40:42 +0100
committerDenis Ledoux <dle@odoo.com>2014-12-05 17:41:11 +0100
commit9996668bade7d7d0e887b1f7c026200f5dd8446b (patch)
treedd25c435cdd07f33b27ff08c20c67ac524becf57 /doc/reference/javascript.rst
parent0bf69d6f82d94976a543816a552e173558d71084 (diff)
[FIX] web: get conditional user defaults
This is possible to set field conditional defaults, if the field has the attribute "change_default". The defaults are set by the web client, by calling the method "get_defaults" of ir.values model, when the onchange is triggered on the field on which the condition is. In 7.0, all onchanges were triggered clientside, one by one. On creation, the defaults of default_get method were pushed in the form, and then, as the values of the fields were changed (from null to the default value), all onchanges on which there was default value were triggered. In 8.0, onchanges are performed server side, all at once. On creation, the onchange method is triggered by default (wether or not there is a default value for them), for all fields (widget param of method do_onchange of view_forms js is undefined, meaning the onchange is not triggered on a specific field, but on all fields). In such a case, we must call the get_defaults method of ir.values model for all fields (having change_default attribute), in order the conditional defaults to be set in the form view.
Diffstat (limited to 'doc/reference/javascript.rst')
0 files changed, 0 insertions, 0 deletions