Search code examples
xmlodooodoo-viewodoo-14

Migrating to odoo 14


I'm trying to install an Odoo 12 module to check the breaking changes in the application, my process is to try to install, go, and fix an issue and then move to the next error.

is there any tool to help with the potential braking changes instead of going one by one?

I'm getting a ParseError exception with a "filter" view, any documentation on how to migrate filters?

<record id="view_employee_filter_grade_rank" model="ir.ui.view">
        <field name="name">Employees Grade Rank</field>
        <field name="model">hr.employee</field>
        <field name="inherit_id" ref="hr.view_employee_filter"/>
        <field name="arch" type="xml">
            <filter name="group_job" context="{'group_by':'job_id'}" position="after">
                <filter string="Grade" icon="terp-gtk-select-all" domain="[]"
                        name ='grade' context="{'group_by':'grade_id'}"/>
                <filter string="Rank" icon="terp-gtk-select-all" domain="[]"
                        name='rank' context="{'group_by':'rank_id'}"/>
            </filter>
        </field>
    </record>

Solution

  • I suppose the error is:

    Element '<filter name="group_job" context="{'group_by':'job_id'}">' cannot be located in parent view
    

    To fix that error, remove the context attribute. The name attribute is enough to match the group_job filter.

    To do migration to version 14.0, you can use the OCA migration guides.

    Check tasks of previous versions if you are migrating from lower versions than v13. It is also recommended to check past migration guides for things not done in previous migrations.