diff options
| author | Simon Lejeune <sle@openerp.com> | 2016-08-25 17:11:40 +0200 |
|---|---|---|
| committer | Simon Lejeune <sle@openerp.com> | 2016-08-26 14:51:46 +0200 |
| commit | 4733c8727e0a59e1917027feff71382fa573d368 (patch) | |
| tree | 190f7060a0c1c8ed9ad7f5b895b3c5700b11ebe1 /addons/web/static/lib/jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js | |
| parent | 1b15aa590b83265794224cdd8e2da8ecc70044b8 (diff) | |
[FIX] base: ir.ui.view: traceback during create from the backend
If you create an ir.ui.view from the backend, it'll everytime
show a traceback (Keyerror arch).
The field we write to in the form view is `arch_base`. Writing in
`arch_base` will indirectly write on `arch`.
The issue is that the `create` function or ir.ui.view is overriden
in order to compute the `type` column. For this to be done, we parse
the `arch` content and the type is the string of the root tag.
The issue is that we parsed the `arch` field instead of `arch_base`.
However, during the creation of the db, convert.py will write to
the `arch` field when inserting the views in database.
Another thing is that we'll get a traceback if the parse fail for
any reasons (an invalid xml string for example). To workaround
that, we chose to catch the issue and do nothing with it as the
constraint on `ir.ui.view` will detects this issue among others and
will raise a proper ValidationError.
Lastly, the actual code only clears the `arch_fs` field if we write
on `arch`. This patch also clears it when writing on `arch_base`.
Diffstat (limited to 'addons/web/static/lib/jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js')
0 files changed, 0 insertions, 0 deletions
