From 3f4074c9f3de83c9b19fdcbe1485ae5571b0ff60 Mon Sep 17 00:00:00 2001 From: ThiagoMForgeFlow Date: Fri, 28 Mar 2025 16:31:42 +0100 Subject: [PATCH] [MIG] web_widget_mpld3_chart: Migration to 18.0 --- web_widget_mpld3_chart/README.rst | 38 +++++++++---------- web_widget_mpld3_chart/__manifest__.py | 4 +- .../static/description/index.html | 8 ++-- .../src/js/web_widget_mpld3_chart.esm.js | 16 ++++---- 4 files changed, 32 insertions(+), 34 deletions(-) diff --git a/web_widget_mpld3_chart/README.rst b/web_widget_mpld3_chart/README.rst index e967398f5..67c3d2e5c 100644 --- a/web_widget_mpld3_chart/README.rst +++ b/web_widget_mpld3_chart/README.rst @@ -17,13 +17,13 @@ Web Widget mpld3 Chart :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github - :target: https://github.com/OCA/web/tree/17.0/web_widget_mpld3_chart + :target: https://github.com/OCA/web/tree/18.0/web_widget_mpld3_chart :alt: OCA/web .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_widget_mpld3_chart + :target: https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_widget_mpld3_chart :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -102,7 +102,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -117,20 +117,20 @@ Authors Contributors ------------ -- Jordi Ballester Alomar -- Christopher Ormaza +- Jordi Ballester Alomar +- Christopher Ormaza Other credits ------------- -- This module uses the library - `mpld3 `__ which is under the - open-source BSD 3-clause "New" or "Revised" License. Copyright (c) - 2013, Jake Vanderplas -- This module uses the library `BeautifulSoup - 4 `__ which is under the - open-source MIT License. Copyright (c) 2014, Leonard Richardson -- Odoo Community Association (OCA) +- This module uses the library + `mpld3 `__ which is under the + open-source BSD 3-clause "New" or "Revised" License. Copyright (c) + 2013, Jake Vanderplas +- This module uses the library `BeautifulSoup + 4 `__ which is under the + open-source MIT License. Copyright (c) 2014, Leonard Richardson +- Odoo Community Association (OCA) Maintainers ----------- @@ -148,14 +148,14 @@ promote its widespread use. .. |maintainer-JordiBForgeFlow| image:: https://github.com/JordiBForgeFlow.png?size=40px :target: https://github.com/JordiBForgeFlow :alt: JordiBForgeFlow -.. |maintainer-ChrisOForgeFlow| image:: https://github.com/ChrisOForgeFlow.png?size=40px - :target: https://github.com/ChrisOForgeFlow - :alt: ChrisOForgeFlow +.. |maintainer-ThiagoMForgeFlow| image:: https://github.com/ThiagoMForgeFlow.png?size=40px + :target: https://github.com/ThiagoMForgeFlow + :alt: ThiagoMForgeFlow Current `maintainers `__: -|maintainer-JordiBForgeFlow| |maintainer-ChrisOForgeFlow| +|maintainer-JordiBForgeFlow| |maintainer-ThiagoMForgeFlow| -This module is part of the `OCA/web `_ project on GitHub. +This module is part of the `OCA/web `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/web_widget_mpld3_chart/__manifest__.py b/web_widget_mpld3_chart/__manifest__.py index 60e50a4b2..e7c7eb4e5 100644 --- a/web_widget_mpld3_chart/__manifest__.py +++ b/web_widget_mpld3_chart/__manifest__.py @@ -6,14 +6,14 @@ "category": "Hidden", "summary": "This widget allows to display charts using MPLD3 library.", "author": "ForgeFlow, Odoo Community Association (OCA)", - "version": "17.0.1.0.0", + "version": "18.0.1.0.0", "website": "https://github.com/OCA/web", "depends": ["web"], "data": [], "external_dependencies": {"python": ["mpld3==0.5.10", "beautifulsoup4"]}, "auto_install": False, "development_status": "Beta", - "maintainers": ["JordiBForgeFlow", "ChrisOForgeFlow"], + "maintainers": ["JordiBForgeFlow", "ThiagoMForgeFlow"], "license": "LGPL-3", "assets": { "web.assets_backend": [ diff --git a/web_widget_mpld3_chart/static/description/index.html b/web_widget_mpld3_chart/static/description/index.html index 4869b3488..9296e72f1 100644 --- a/web_widget_mpld3_chart/static/description/index.html +++ b/web_widget_mpld3_chart/static/description/index.html @@ -369,7 +369,7 @@ ul.auto-toc { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:671a850d1911018fe9105e0d3c6f95fd235257bade3adba7267cc1cad2641cbe !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: LGPL-3 OCA/web Translate me on Weblate Try me on Runboat

+

Beta License: LGPL-3 OCA/web Translate me on Weblate Try me on Runboat

This module adds the possibility to insert mpld3 charts into Odoo standard views. This is an interactive D3js-based viewer which brings matplotlib graphics to the browser.

@@ -445,7 +445,7 @@ your mpld3 chart:

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -486,8 +486,8 @@ open-source MIT License. Copyright (c) 2014, Leonard Richardson mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainers:

-

JordiBForgeFlow ChrisOForgeFlow

-

This module is part of the OCA/web project on GitHub.

+

JordiBForgeFlow ThiagoMForgeFlow

+

This module is part of the OCA/web project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/web_widget_mpld3_chart/static/src/js/web_widget_mpld3_chart.esm.js b/web_widget_mpld3_chart/static/src/js/web_widget_mpld3_chart.esm.js index e016025a2..30d576420 100644 --- a/web_widget_mpld3_chart/static/src/js/web_widget_mpld3_chart.esm.js +++ b/web_widget_mpld3_chart/static/src/js/web_widget_mpld3_chart.esm.js @@ -1,5 +1,5 @@ import {Component, markup, onMounted, onPatched, onWillStart, useRef} from "@odoo/owl"; -import {loadBundle} from "@web/core/assets"; +import {loadJS} from "@web/core/assets"; import {registry} from "@web/core/registry"; export default class Mpld3ChartJsonWidget extends Component { @@ -15,14 +15,12 @@ export default class Mpld3ChartJsonWidget extends Component { script.text = this.props.record.data[this.props.name].script; this.widget.el.append(script); }); - onWillStart(() => - loadBundle({ - jsLibs: [ - "/web_widget_mpld3_chart/static/src/lib/d3/d3.v5.js", - "/web_widget_mpld3_chart/static/src/lib/mpld3/mpld3.v0.5.10.js", - ], - }) - ); + onWillStart(async () => { + await loadJS("/web_widget_mpld3_chart/static/src/lib/d3/d3.v5.js"); + await loadJS( + "/web_widget_mpld3_chart/static/src/lib/mpld3/mpld3.v0.5.10.js" + ); + }); } markup(value) { console.log("Marking up...");