Closed imanie383 closed 1 year ago
@moylop260
@antonag32
In fact, it is done but it could require a fix
@moylop260 I think we can close this? XML files are no longer checked by pylint-odoo and we just did something related to this in oca hooks.
Totally agree!
I just added the following XML code in the test_repo:
<record id="view partner form inherit" model="ir.ui.view">
<field name="name">res.partner.form.inherit</field>
<field name="model">res.partner</field>
<field name="priority" eval="30"/>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="priority" eval="100"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='toggle active']" position="before">
<button class="o stat button" name="action open duplicates" type="object" icon="fa-clone" string="Show duplicates"/>
<button class="o stat button" name="action open similar" type="object" icon="fa-clone" string="Show similar"/>
</xpath>
</field>
</record>
After run the unittest the result was:
test_repo/broken_module/model_view_odoo2.xml:75 Duplicate xml field "priority" in lines 77 - [xml-duplicate-fields]
We need a lint that validates duplicate fields, to avoid: