OCA / odoo-pre-commit-hooks

Linters of Odoo addons that complement pylint-odoo
GNU Affero General Public License v3.0
10 stars 12 forks source link

oca-hooks:disable=duplicate-xml-record-id doesn't work #89

Closed alexis-via closed 1 year ago

alexis-via commented 1 year ago

In this PR on OCA/l10n-france https://github.com/OCA/l10n-france/pull/423 I'm using oca-hooks as explained in the README

<?xml version="1.0" encoding="utf-8" ?>
<!-- oca-hooks:disable=duplicate-xml-record-id -->

I placed this in the 2 files data/l10n_fr_chart_data.xml and data/account_chart_template_data.xml that use the XMLID l10n_fr_pcg_chart_template But, in the precommit tests, I get:

l10n_fr_oca/data/l10n_fr_chart_data.xml:5 Duplicate xml record id "data/l10n_fr_pcg_chart_template_noupdate_0" in l10n_fr_oca/data/account_chart_template_data.xml:4 - [xml-duplicate-record-id]
pedrobaeza commented 1 year ago

The check is now xml-duplicate-record-id, not duplicate-xml-record-id

alexis-via commented 1 year ago

Thank you very much @pedrobaeza for spotting my error. Tests are now green !