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

Add xml-record-without-id: Detect cases where an record doesn't have xml-id #63

Closed moylop260 closed 1 year ago

moylop260 commented 1 year ago

Bad

 <?xml version="1.0" ?>
 <odoo noupdate="1">
    <record model="ir.cron">
...

Good

 <?xml version="1.0" ?>
 <odoo noupdate="1">
    <record id="my_id" model="ir.cron">
...

I think the xpath could looks like: