odoo/addons/web/static/src
Denis Ledoux 9996668bad [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.
2014-12-05 17:41:11 +01:00
..
css [FIX] base: oe_subtotal_footer_separator width 2014-12-01 10:42:36 +01:00
font [IMP] clean permissions and shebang in files 2013-05-14 12:37:36 +02:00
img [IMP] compress *logo*.png with pngquant 2014-09-16 19:54:59 +02:00
js [FIX] web: get conditional user defaults 2014-12-05 17:41:11 +01:00
xml [FIX] web: t-attf expects #{} or {{}} for variables 2014-11-04 10:55:38 +01:00