diff options
| author | Martin Trigaux <mat@odoo.com> | 2017-03-23 11:04:29 +0100 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2017-03-23 14:38:05 +0100 |
| commit | 71d86afb5819c514ce00bee4857036e8ff206854 (patch) | |
| tree | 9f195b03e9d9d81b418d298deca50a76e3994af3 /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | 1031a699b7c28bf3f3732813a7de3d8f86653c46 (diff) | |
[FIX] base: deactivate default language
When a language is deactivated, it may still be referred to in a default value.
A ir.value is created at the database setup to specify the default language.
If a user deactivate the default language but not the ir.value, the creation of
a res.partner would fail as trying to set an unknown value to a selection field.
This commit removes the default value when deactivating the linked language.
The patch is minimal for the bug. A more generic solution would be to verify the
ir.value when calling the default_get method.
This is however a risk of performance degradation (e.g. during a csv import) for
a rare scenario.
The dynamic selection scenario is probably on relevant to res.lang.
A similar problem can occur with many2one fields but is difficult to fix without
performance degradation.
Closes #16009
Fixes #15979
Fixes #3854
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
