summaryrefslogtreecommitdiff
path: root/addons/base_import/static
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2019-08-20 09:26:07 +0000
committerXavier Morel <xmo@odoo.com>2019-08-20 09:26:07 +0000
commitdf1aa689be097b71d9dc2ef7e6cdb875337083c6 (patch)
tree31134d29ce2eeacbecb5775298b8fb1ba3e49c51 /addons/base_import/static
parent9920f20e4c7753bc17bea71dea3a90f7de687196 (diff)
[FIX] web: race condition in export widget
Looks like the race condition dates back to the introduction of "default" export fields but #32339 made it into a hard error (rather than silently not load the fields): setting / selecting the default fields waited in the exports lists to be loaded, but the exports lists are just predefined lists of fields, that's got no relation to the loaded or default fields, which are loaded (somewhat implicitly) by _onChangeCompatibleInput. As a result, if the lookup of the ir.exports was faster than fetching the model's fields, we'd execute "select the fields from the list view" before the exports widget knew anyting about the model's own fields. Because the old code iterated on the loaded fields and checked if they were to enable it would just do nothing (as it would iterate an empty object). Because the new code iterates on the defaults fields and looks them up in the records map, it gets an undefined and triggers an error. Fix by waiting on the proper RPC call. Reported-by: Andreas Stauder (@BT-astauder) closes odoo/odoo#35837 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Diffstat (limited to 'addons/base_import/static')
0 files changed, 0 insertions, 0 deletions