diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2018-12-13 18:22:34 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2018-12-13 18:22:34 +0000 |
| commit | 5f4a9451828fff1919c74e421001bc111c5c138d (patch) | |
| tree | b2b7ad07d2f2fe08c47f70217b5ba9ed82381a4f /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | 3ce5c8bebd66490586cd631b8be40a5451aa2c9e (diff) | |
[FIX] modules: load demo data fallback
- Create a new DB with `base_automation`, without demo data
- Switch to developer mode
- Go to Settings, then 'Load demo data', validate
A traceback occurs.
An error since the demo data in `base_automation_demo.xml` are pointing
to `model_base_automation_lead_test`, which is a test model. It is
therefore not created whithout demo data. The error is:
```
bad query: b'RELEASE SAVEPOINT "5159....."'
```
However, that's not the real crash. Indeed, in case the installation of
demo data crashes, `demo_failure_todo` is supposed to handle the
situation like a boss. But in this case, the DB cursor seems unusable.
Therefore, the following crashes like a gros caca:
``` python
todo = env.ref('base.demo_failure_todo', raise_if_not_found=False)
```
Solution: use a new cursor.
opw-1916918
closes odoo/odoo#29528
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
