[19.0] bi_sql_editor HTML content renders as raw text (not formatted) in Odoo 19 List views
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 85/100
Research direction
The fix is in bi_sql_editor/models/bi_sql_view_field.py where _TTYPE_SELECTION needs a new 'html' entry. Open that file, locate the selection list around line 16, and add the html option alongside the existing types. Verify by creating a SQL view with HTML content and checking that it renders formatted in List view instead of as raw text.
Written by the indexing model from the issue text.
Description
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:
- create a SQL view containing a field with HTML content
- create and open the UI in List View
- 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
- Dominant language
- HTML
- Stars
- 435
- Forks
- 929
- Avg merge
- 6d 18h
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OCA/reporting-engine
-
Migration to version 20.0Possibly taken A pull request linked to this issue is open or already merged. Openhelp wanted no stale work in progress
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
OCA/reporting-engine#1206 · 3 comments ·
Maintainers usually reply within 1 day
-
Properties Handling When ExportingPossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 2/5 Under an hour Newbie friendliness 85/100
OCA/reporting-engine#1190 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 65/100
OCA/reporting-engine#1197 · 2 comments ·
Maintainers usually reply within 1 day
-
bug stale
Difficulty 4/5 3-5 days Newbie friendliness 22/100
OCA/reporting-engine#1136 · 2 comments ·
Maintainers usually reply within 1 day
-
Migration to version 19.0Possibly taken A pull request linked to this issue is open or already merged. Openhelp wanted no stale work in progress
Difficulty 4/5 3-5 days Newbie friendliness 30/100
OCA/reporting-engine#1070 · 12 comments ·
Maintainers usually reply within 1 day
All issues in OCA/reporting-engine
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
milind-soni/OpenMausBot#5829 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
finos/fluxnova-bpm-platform#387 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
OHDSI/Data2Evidence#3693 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Project-N-E-K-O/N.E.K.O#3725 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
kubernetes-sigs/headlamp#8408 ·
Maintainers usually reply within 1 day