Skip to content

Commit

Permalink
[IMP] web_widget_plotly: black, isort, prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
robyf70 committed Jun 7, 2023
1 parent e4bbe22 commit 2bc689d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 21 deletions.
1 change: 0 additions & 1 deletion web_widget_plotly_chart/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

19 changes: 9 additions & 10 deletions web_widget_plotly_chart/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
{
'name': "Web Widget Plotly",
'summary': """Allow to draw plotly charts.""",
'author': "LevelPrime srl, "
"Odoo Community Association (OCA)",
"name": "Web Widget Plotly",
"summary": """Allow to draw plotly charts.""",
"author": "LevelPrime srl, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web",
'category': 'Web',
'version': '12.0.1.0.0',
'depends': ['web'],
'data': [
'views/web_widget_plotly_chart.xml',
"category": "Web",
"version": "14.0.1.0.0",
"depends": ["web"],
"data": [
"views/web_widget_plotly_chart.xml",
],
"external_dependencies": {
"python": ['plotly'],
"python": ["plotly"],
},
"auto_install": False,
"license": "LGPL-3",
Expand Down
16 changes: 8 additions & 8 deletions web_widget_plotly_chart/static/src/js/widget_plotly.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
odoo.define('web_widget_plotly_chart', function(require) {
'use strict'
odoo.define("web_widget_plotly_chart", function (require) {
"use strict";

var fieldRegistry = require('web.field_registry');
var AbstractField = require('web.AbstractField');
var fieldRegistry = require("web.field_registry");
var AbstractField = require("web.AbstractField");

var PlotlyChartWidget = AbstractField.extend({
_renderReadonly: function() {
_renderReadonly: function () {
var val = this.value;
this.$el.html(val);
}
},
});
fieldRegistry.add('plotly_chart', PlotlyChartWidget);
fieldRegistry.add("plotly_chart", PlotlyChartWidget);
return {
PlotlyChartWidget: PlotlyChartWidget
PlotlyChartWidget: PlotlyChartWidget,
};
});
10 changes: 8 additions & 2 deletions web_widget_plotly_chart/views/web_widget_plotly_chart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
<xpath expr="//script[last()]" position="after">

<!-- 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 -->
<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>
</template>
Expand Down

0 comments on commit 2bc689d

Please sign in to comment.