3
0
Fork 0

[IMP] web_widget_plotly: black, isort, prettier

16.0
Roberto Fichera 2021-12-06 23:02:39 +01:00
parent e4bbe224ab
commit 2bc689d86a
4 changed files with 25 additions and 21 deletions

View File

@ -1 +0,0 @@

View File

@ -1,17 +1,16 @@
{ {
'name': "Web Widget Plotly", "name": "Web Widget Plotly",
'summary': """Allow to draw plotly charts.""", "summary": """Allow to draw plotly charts.""",
'author': "LevelPrime srl, " "author": "LevelPrime srl, " "Odoo Community Association (OCA)",
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web", "website": "https://github.com/OCA/web",
'category': 'Web', "category": "Web",
'version': '12.0.1.0.0', "version": "14.0.1.0.0",
'depends': ['web'], "depends": ["web"],
'data': [ "data": [
'views/web_widget_plotly_chart.xml', "views/web_widget_plotly_chart.xml",
], ],
"external_dependencies": { "external_dependencies": {
"python": ['plotly'], "python": ["plotly"],
}, },
"auto_install": False, "auto_install": False,
"license": "LGPL-3", "license": "LGPL-3",

View File

@ -1,17 +1,17 @@
odoo.define('web_widget_plotly_chart', function(require) { odoo.define("web_widget_plotly_chart", function (require) {
'use strict' "use strict";
var fieldRegistry = require('web.field_registry'); var fieldRegistry = require("web.field_registry");
var AbstractField = require('web.AbstractField'); var AbstractField = require("web.AbstractField");
var PlotlyChartWidget = AbstractField.extend({ var PlotlyChartWidget = AbstractField.extend({
_renderReadonly: function() { _renderReadonly: function () {
var val = this.value; var val = this.value;
this.$el.html(val); this.$el.html(val);
} },
}); });
fieldRegistry.add('plotly_chart', PlotlyChartWidget); fieldRegistry.add("plotly_chart", PlotlyChartWidget);
return { return {
PlotlyChartWidget: PlotlyChartWidget PlotlyChartWidget: PlotlyChartWidget,
}; };
}); });

View File

@ -3,10 +3,16 @@
<xpath expr="//script[last()]" position="after"> <xpath expr="//script[last()]" position="after">
<!-- Library --> <!-- Library -->
<script type="text/javascript" src="/web_widget_plotly_chart/static/lib/plotly/plotly-latest.min.js"></script> <script
type="text/javascript"
src="/web_widget_plotly_chart/static/lib/plotly/plotly-latest.min.js"
/>
<!-- Widget --> <!-- Widget -->
<script type="text/javascript" src="/web_widget_plotly_chart/static/src/js/widget_plotly.js"></script> <script
type="text/javascript"
src="/web_widget_plotly_chart/static/src/js/widget_plotly.js"
/>
</xpath> </xpath>
</template> </template>