Skip to content

Commit

Permalink
[REF] checks_odoo_module_xml: Allow duplicated fields with 'groups'
Browse files Browse the repository at this point in the history
Related to odoo/odoo#103743
Fix #10
  • Loading branch information
moylop260 committed Oct 24, 2022
1 parent 445a347 commit adc8395
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -274,7 +274,7 @@ options:
* xml-duplicate-fields

- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.0.11/test_repo/broken_module/model_view_odoo2.xml#L132 Duplicate xml field "name" in lines 133
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.0.11/test_repo/broken_module/model_view_odoo2.xml#L138 Duplicate xml field "name" in lines 139
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.0.11/test_repo/broken_module/model_view_odoo2.xml#L141 Duplicate xml field "name" in lines 142
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.0.11/test_repo/broken_module/model_view_odoo2.xml#L41 Duplicate xml field "key_config" in lines 42
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.0.11/test_repo/broken_module/model_view_odoo2.xml#L6 Duplicate xml field "name" in lines 13
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.0.11/test_repo/broken_module/model_view_odoo2.xml#L73 Duplicate xml field "arch" in lines 76
Expand Down
1 change: 1 addition & 0 deletions src/oca_pre_commit_hooks/checks_odoo_module_xml.py
Expand Up @@ -90,6 +90,7 @@ def check_xml_records(self):
field.get("name"),
field.get("context"),
field.get("filter_domain"),
field.get("groups"),
field.getparent(),
)
xml_fields[field_key].append((manifest_data, field))
Expand Down
3 changes: 3 additions & 0 deletions 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 adc8395

Please sign in to comment.