[18.0][MIG] web_widget_mpld3_chart#3140
Conversation
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/
6a8db30 to
7aaa4ff
Compare
| "external_dependencies": {"python": ["mpld3==0.5.10", "beautifulsoup4"]}, | ||
| "auto_install": False, | ||
| "development_status": "Beta", | ||
| "maintainers": ["JordiBForgeFlow", "ChrisOForgeFlow"], |
There was a problem hiding this comment.
@ThiagoMForgeFlow Can you replace Chris as maintainer? (he's not active anymore)
7aaa4ff to
d7385e0
Compare
LoisRForgeFlow
left a comment
There was a problem hiding this comment.
Functional test, working fine 👍
| ], | ||
| }) | ||
| ); | ||
| onWillStart(async () => { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Yes, it loads them without order, giving errors. Sorry for the confusion 😢
aff2c96 to
03e9b6c
Compare
03e9b6c to
3f4074c
Compare
|
On my way to merge this fine PR! |
|
/ocabot migration web_widget_mpld3_chart |
|
Congratulations, your PR was merged at 3d26dd2. Thanks a lot for contributing to OCA. ❤️ |
Migration to 18.0
@ForgeFlow