Skip to content

Commit

Permalink
Merge 2650354 into 12374c1
Browse files Browse the repository at this point in the history
  • Loading branch information
moylop260 committed Oct 24, 2022
2 parents 12374c1 + 2650354 commit d6c9641
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pylint_odoo/checkers/modules_odoo.py
Expand Up @@ -777,10 +777,11 @@ def _get_duplicate_xml_fields(self, fields):
all_fields.setdefault(
(field_xml, field.attrib.get('context'),
field.attrib.get('filter_domain'),
field.attrib.get('groups'),
field.getparent()), []).append(field)
# Remove all keys which not duplicated by excluding them from the
return dict(((name, context, filter_domain, parent_node), nodes) for
(name, context, filter_domain, parent_node), nodes in
return dict(((name, context, filter_domain, groups, parent_node), nodes) for
(name, context, filter_domain, groups, parent_node), nodes in
all_fields.items() if len(nodes) >= 2)

def _check_duplicate_xml_fields(self):
Expand Down
3 changes: 3 additions & 0 deletions pylint_odoo/test_repo/broken_module/model_view_odoo2.xml
Expand Up @@ -131,6 +131,9 @@
<tree>
<field name="name"/>
<field name="name"/>

<field name="company_id" invisible="1"/>
<field name="company_id" groups="base.group_multi_company"/>
</tree>
</field>
<field name="value_ids">
Expand Down

0 comments on commit d6c9641

Please sign in to comment.