List View Decoration Attributes in Odoo 18

List View Decoration Attributes in Odoo 18

List view decorations in Odoo are a powerful way to enhance the user experience by visually emphasizing specific records or fields in the list/tree view based on defined conditions. These visual cues make it easier to spot critical or noteworthy records at a glance. In Odoo 18, several decoration attributes are available, offering flexibility and control over data presentation.

The <list> element in Odoo uses the decoration-type attribute to apply these visual highlights. This attribute allows you to define conditions under which the decorations are triggered, enabling efficient data management and improved usability.

The syntax for using decoration attributes in a list view definition is as follows:


For Example :


1. decoration-info

The decoration-info attribute is used to highlight records in blue, typically indicating information that needs attention but isn’t critical. You can apply this decoration based on a condition.

2. decoration-danger

The decoration-danger attribute highlights records in red, typically used to indicate a critical issue or error that requires immediate attention.

3. decoration-success

The decoration-success attribute is used to indicate successful or positive conditions, highlighted in green. It’s commonly used for completed tasks, paid invoices, or stock levels above a threshold.

4. decoration-muted

The decoration-muted attribute allows you to gray out certain records. It’s often used to indicate inactive or archived records.

5. decoration-warning

This attribute highlights records in yellow, indicating a warning or something that needs caution.

7. decoration-it (Italic)

This attribute renders the field in italic text. It’s a subtler way of decorating the view, often used for less critical visual distinctions.

8. decoration-bf (Bold)

The decoration-bf attribute applies bold formatting to fields.

9.? decoration-primary

The decoration-primary attribute is used to highlight records in light purple, typically indicating information that needs attention but isn’t critical. You can apply this decoration based on a condition.


#TechGuide #OdooModules #odooindia #OdooExperience #Odoo18#ProForma #Invoices

要查看或添加评论,请登录

Harshal Oza的更多文章

社区洞察

其他会员也浏览了