Skip to content

[19.0] bi_sql_editor HTML content renders as raw text (not formatted) in Odoo 19 List views #1187

Description

@ray-odoo

Module

bi_sql_editor

Describe the bug

HTML content in CHAR fields correctly displays with the HTML widget in Odoo 16 but not Odoo 17, Odoo 18 or Odoo 19. This is because in Odoo 17 field widgets are resolved through the fields registry and there's now stricter matching between a widget and the declared field type. When the widget/type pairing doesn't line up the way the registry expects, the List view falls back to the generic/default renderer for the field's actual ttype (char), which just prints the raw string — tags and all.

To Reproduce

Odoo 17, Odoo 18, Odoo 19

Steps to reproduce the behavior:

  1. create a SQL view containing a field with HTML content
  2. create and open the UI in List View
  3. observe the raw rendering of the content

Expected behavior
The content should render as other html fields do with the html widget

Solution
Support the html field type

Add "html" as an option to _TTYPE_SELECTION

https://github.com/OCA/reporting-engine/blob/19.0/bi_sql_editor/models/bi_sql_view_field.py#L16

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions