Skip to content

[18.0][MIG] web_widget_mpld3_chart#3140

Merged
OCA-git-bot merged 29 commits intoOCA:18.0from
ForgeFlow:18.0-mig-web_widget_mpld3_chart
Apr 14, 2025
Merged

[18.0][MIG] web_widget_mpld3_chart#3140
OCA-git-bot merged 29 commits intoOCA:18.0from
ForgeFlow:18.0-mig-web_widget_mpld3_chart

Conversation

@ThiagoMForgeFlow
Copy link
Copy Markdown
Contributor

Migration to 18.0

@ForgeFlow

JordiBForgeFlow and others added 28 commits March 28, 2025 16:09
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: web-15.0/web-15.0-web_widget_mpld3_chart
Translate-URL: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_widget_mpld3_chart/
Currently translated at 100.0% (1 of 1 strings)

Translation: web-16.0/web-16.0-web_widget_mpld3_chart
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_widget_mpld3_chart/it/
Currently translated at 100.0% (1 of 1 strings)

Translation: web-16.0/web-16.0-web_widget_mpld3_chart
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_widget_mpld3_chart/es/
@ThiagoMForgeFlow ThiagoMForgeFlow force-pushed the 18.0-mig-web_widget_mpld3_chart branch from 6a8db30 to 7aaa4ff Compare March 31, 2025 09:47
Comment thread web_widget_mpld3_chart/__manifest__.py Outdated
"external_dependencies": {"python": ["mpld3==0.5.10", "beautifulsoup4"]},
"auto_install": False,
"development_status": "Beta",
"maintainers": ["JordiBForgeFlow", "ChrisOForgeFlow"],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ThiagoMForgeFlow Can you replace Chris as maintainer? (he's not active anymore)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changed!

@ThiagoMForgeFlow ThiagoMForgeFlow force-pushed the 18.0-mig-web_widget_mpld3_chart branch from 7aaa4ff to d7385e0 Compare April 4, 2025 07:34
Copy link
Copy Markdown
Contributor

@LoisRForgeFlow LoisRForgeFlow left a comment

Choose a reason for hiding this comment

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

Functional test, working fine 👍

],
})
);
onWillStart(async () => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A small suggestion. Why don't you create an specific asset and load directly as loadBundle? This way you may add extra libraries if needed.

WDYT?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I changed loadBundle to loadJS funtion because the old method now only accepts an asset as a parameter. For simplicity, I have added the two lines of loadJS. But you are right, if we create an asset for these two files also works. Do you prefer to change it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think I was not clear enough.

The idea is to create a new asset called mpld3 and add the libraries. This is done by adding the list on the assets key in the manifest. This way we can extend in the future with child libraries of mpld or adding specific css or whatever we want

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The loadBundle in version 18 loads the asset in parallel. The before and after directives can be used to enforce a specific order. However, with the current code, the following error is displayed:

Uncaught Promise > The following error occurred in onWillStart: "JSON.parse: unexpected character at line 1 column 1 of the JSON data"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've been trying to fix the error, but it seems that Odoo doesn't load the bundle correctly. I'm going back to the first version using loadJS.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, it loads them without order, giving errors. Sorry for the confusion 😢

@ThiagoMForgeFlow ThiagoMForgeFlow force-pushed the 18.0-mig-web_widget_mpld3_chart branch 2 times, most recently from aff2c96 to 03e9b6c Compare April 4, 2025 09:06
@ThiagoMForgeFlow ThiagoMForgeFlow force-pushed the 18.0-mig-web_widget_mpld3_chart branch from 03e9b6c to 3f4074c Compare April 14, 2025 11:38
Copy link
Copy Markdown
Member

@etobella etobella left a comment

Choose a reason for hiding this comment

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

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

On my way to merge this fine PR!
Prepared branch 18.0-ocabot-merge-pr-3140-by-etobella-bump-nobump, awaiting test results.

@etobella
Copy link
Copy Markdown
Member

/ocabot migration web_widget_mpld3_chart

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Apr 14, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Apr 14, 2025
48 tasks
@OCA-git-bot OCA-git-bot merged commit 74666a1 into OCA:18.0 Apr 14, 2025
5 of 7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 3d26dd2. 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.