diff options
| author | Denis Ledoux <dle@odoo.com> | 2019-01-15 15:28:54 +0000 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2019-01-15 16:43:08 +0000 |
| commit | a409627602ab6c03364b492b5ba7a6fbaba6c5d6 (patch) | |
| tree | 740af921d523375ddfe3929cb365261e7bd9519a /addons/web_editor/static/lib/summernote/src | |
| parent | c5a8e39758004be784999dacd322d94fb077318e (diff) | |
[FIX] ir_ui_view: do not change view mode when just changing the inherit
Some views have the primary mode while having an inherit_id view
In such views, if the user wants to change the inherit_id,
the mode must remain primary.
The use case behind this is a user who want to change
the inherit_id view of the view
product.product.form (product.product_normal_form_view)
to another view.
This view is in primary mode while having an inherit_id
(product.product_template_form_view).
In such a case, the primary mode must remain,
otherwise the view will no longer be opened by default
when opening a product.
Indeed, when searching the default form view of a model,
it only searches for primary mode views for this model.
The `all` is there because this is an `api.multi` method.
We could consider adding a `self.ensure_one`,
but it breaks the API if someones calls this method with multiple records.
This is likely to happen, as this method is used
in `write` which is likely to be called with multiple records.
In my opinion, in master, this should be replaced by an
onchange so the user can see the change of mode
when he adds or remove an inherit_id for a view.
opw-1916324
closes odoo/odoo#30241
Diffstat (limited to 'addons/web_editor/static/lib/summernote/src')
0 files changed, 0 insertions, 0 deletions
