Skip to content
Snippets Groups Projects
Commit 54968d55 authored by Denis Ledoux's avatar Denis Ledoux
Browse files

[FIX] tools: do not overwrite view priority on update

In some cases, users change the sequence of base
views in order to have one applied before the other
e.g. when there is two inherited views doing
```
<tree position="inside">
...
</tree>
```
The priority of the views will have an impact on the
fields order in the tree.

On update, the change of priority done by the users
was overwritten, even if the priority of the view
was not defined in the XML code of the view.

The priority of the views should be overwritten only
in the case were the priority of the view
is specifically set in its definition.

opw-688470
parent 5be40868
Branches
Tags
No related merge requests found
......@@ -741,7 +741,8 @@ form: module.record_id""" % (xml_id,)
record.append(Field(name, name='name'))
record.append(Field(full_tpl_id, name='key'))
record.append(Field("qweb", name='type'))
record.append(Field(el.get('priority', "16"), name='priority'))
if 'priority' in el.attrib:
record.append(Field(el.get('priority'), name='priority'))
if 'inherit_id' in el.attrib:
record.append(Field(name='inherit_id', ref=el.get('inherit_id')))
if 'website_id' in el.attrib:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment