diff options
| author | Aaron Bohy <aab@odoo.com> | 2019-07-02 13:09:16 +0000 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2019-07-03 06:29:46 +0000 |
| commit | 869cc1523242c9c22cf02c327a832bc7cd34e10c (patch) | |
| tree | db0fa043f8d49a481c2a30c604bceaa78f97840d /addons/base_geolocalize/models/base_geocoder.py | |
| parent | 2512dcdd0a6cd60367640f46914df1984c0bff51 (diff) | |
[FIX] web: form: combine field and renderer classnames
The rendering of field widgets is asynchronous (as it returns a
native Promise). However, the '_renderFieldWidget' method of basic
renderers is sync, and returns a fake div that will be replaced by
the widget'$el afterwards.
The form renderer sometimes needs to add classNames on the rendered
nodes (e.g. each child of an outer group as class 'o_group_col_x').
To handle this, once the field widget is ready, we copied all
attributes of the fake node to the widget's node. Unfortunately, we
were erasing the attr value (e.g. className) by the new one. As a
consequence, the className defined in the widget were lost. This
could be observed for the 'note' field in 'sale.order'.
As this was only necessary for classNames, this rev. only retrieves
the class attribute of the fake node, and adds it to the classNames
of the widget's $el.
closes odoo/odoo#34528
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Diffstat (limited to 'addons/base_geolocalize/models/base_geocoder.py')
0 files changed, 0 insertions, 0 deletions
