Migrating XML Views in Odoo 19.0: Removing Deprecated `<group>` Properties

작성자

카테고리:

← 피드로
DEV Community · Khaled Said · 2026-07-05 개발(SW)

Khaled Said

With the release of Odoo 19.0, several changes were introduced to the XML view engine. One of the most impactful adjustments relates to the <group> tag in search views. If you’ve recently upgraded, you may have encountered the dreaded error:

View error context: -no context-

Enter fullscreen mode Exit fullscreen mode

This error is directly tied to deprecated properties inside <group> tags.

❌ What Changed?

In earlier versions of Odoo, developers often used <group> with properties such as:

<group expand="0" string="Group By">
    <filter name="user_id" string="User" context="{'group_by': 'user_id'}"/>
</group>

Enter fullscreen mode Exit fullscreen mode

However, starting from Odoo 19.0, the following attributes are no longer supported:

  • expand="0"
  • name="group_by"
  • string="Group By"

✅ How to Fix It

You should remove the unsupported properties and keep only the valid <filter> definitions inside <group>. For example:

Old (pre-19.0)

<group expand="0" string="Group By">
    <filter name="user_id" string="User" context="{'group_by': 'user_id'}"/>
</group>

Enter fullscreen mode Exit fullscreen mode

New (19.0+)

<group>
    <filter name="user_id" string="User" context="{'group_by': 'user_id'}"/>
</group>

Enter fullscreen mode Exit fullscreen mode

🛠 Migration Checklist

  1. Search your codebase for <group> tags which has such attributes in XML views.
  2. Remove deprecated attributes (expand, name, string).

📌 Conclusion

This change may seem minor, but it’s crucial for a smooth migration to Odoo 19.0. By cleaning up your XML views and removing deprecated <group> properties, you’ll avoid runtime errors and ensure compatibility with the view engine.

원문에서 계속 ↗

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다