Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] web_tree_dynamic_colored_field #3107

Merged
merged 38 commits into from
Feb 25, 2025

Conversation

etobella
Copy link
Member

Finishes #2999

@legalsylvain
Copy link
Contributor

Could you squash the 3 migration commits to make review easier ?

Thanks !

@etobella
Copy link
Member Author

Well, there are 3 different authors. I could add them as co-authors of the same commit, but I think it is not the best approach 😢

However, you can check the differences here 😄

https://github.com/OCA/web/compare/41f0ddef2d3fbf729ce00b49a6242099108fe6a5..c6e97039140b581c2d93f42844abbd6463e89c7c

damdam-s and others added 28 commits February 25, 2025 09:55
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.
[UPD] README.rst
Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: web-13.0/web-13.0-web_tree_dynamic_colored_field
Translate-URL: https://translation.odoo-community.org/projects/web-13-0/web-13-0-web_tree_dynamic_colored_field/
[UPD] README.rst
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: web-15.0/web-15.0-web_tree_dynamic_colored_field
Translate-URL: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_tree_dynamic_colored_field/

Added translation using Weblate (French)
@etobella etobella force-pushed the 16.0-mig-web_tree_dynamic_colored_field branch from c6e9703 to 3e24887 Compare February 25, 2025 08:58
Copy link

@kluna1998 kluna1998 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏽

@etobella
Copy link
Member Author

/ocabot migration web_tree_dynamic_colored_field

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Feb 25, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Feb 25, 2025
47 tasks
@etobella
Copy link
Member Author

This PR has been open for 6 months.... I think we can proceed with merge @legalsylvain

Copy link
Member

@zamberjo zamberjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@legalsylvain
Copy link
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-3107-by-legalsylvain-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 16814c0 into OCA:16.0 Feb 25, 2025
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at ba87706. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.