forked from Techsystech/web
[IMP] web_widget_plotly: black, isort, prettier
parent
e4bbe224ab
commit
2bc689d86a
|
@ -1 +0,0 @@
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue