Skip to content

[fork-CI] [19.0][MIG] web_tree_dynamic_colored_field: Migration to 19.0#10

Draft
dnplkndll wants to merge 33 commits into
19.0from
19.0-mig-web_tree_dynamic_colored_field
Draft

[fork-CI] [19.0][MIG] web_tree_dynamic_colored_field: Migration to 19.0#10
dnplkndll wants to merge 33 commits into
19.0from
19.0-mig-web_tree_dynamic_colored_field

Conversation

@dnplkndll

Copy link
Copy Markdown

@dnplkndll dnplkndll force-pushed the 19.0-mig-web_tree_dynamic_colored_field branch 13 times, most recently from 77db3e4 to d443c50 Compare June 13, 2026 17:09
damdam-s and others added 17 commits June 13, 2026 13:39
support color_field attribute

update manifest

higher version number bump

typo
The options in <field> attributes are parsed as python expressions:
https://github.com/odoo/odoo/blob/d18976d7489f6cd1c904f72557104807233a178d/addons/web/static/src/js/services/data_manager.js#L273

And the options in <button> are parsed as json...
https://github.com/odoo/odoo/blob/d18976d7489f6cd1c904f72557104807233a178d/addons/web/static/src/js/services/data_manager.js#L411

This code only support the <field> element because I'm not sure there
is a use for the <button> element.
…'color_field'

The index at 0 in the following code:
  var colorField = this.arch.attrs.colors.split(';')
  .filter(color => color.trim().startsWith('color_field'))[0]
Was failing on such valid xml:
  <tree string="Buffer monitor"
        colors="red:procure_recommended_qty &gt; 0">
Use 'options' instead of 'colors' on tree views

The colors attribute has been removed from the RelaxNG schema in
Odoo [0], so use the 'options' instead.

Closes OCA#1479

[0] odoo/odoo@7024f8d#diff-e9acd2f731cc01f302055b6e232df983
The 'colors' and 'options' fields are not supported by the RelaxNG
schema of the <tree> element. Remove the support until we find a
good solution for this.
@dnplkndll dnplkndll force-pushed the 19.0-mig-web_tree_dynamic_colored_field branch from d443c50 to cdda026 Compare June 13, 2026 17:47
@dnplkndll dnplkndll force-pushed the 19.0-mig-web_tree_dynamic_colored_field branch from cdda026 to 7d6f548 Compare June 13, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.