Commit 1bca7a21 authored by 昱翔 曾's avatar 昱翔 曾
Browse files

fix(sales-chart): remove unneeded code

3 merge requests!6115.0,!60Feat cost chart,!58Add security settings and remove debug code
Showing with 0 additions and 19 deletions
+0 -19
......@@ -4,4 +4,3 @@
from . import inquiry_model
from . import sale_order_model
from . import sale_order_line_model
from . import report_chart_model
from odoo import models, fields
class View(models.Model):
_inherit = 'ir.ui.view'
type = fields.Selection(selection_add=[('sale_report_chart', 'Sale Report Chart')])
class ActWindowView(models.Model):
_inherit = 'ir.actions.act_window.view'
view_mode = fields.Selection(selection_add=[('sale_report_chart', 'Sale Report Chart')], ondelete={'sale_report_chart': 'cascade'})
class ReportChart(models.Model):
_name = 'sale.report.chart'
_description = 'Sale Report Chart'
name = fields.Char(string='Name', required=True)
......@@ -28,14 +28,11 @@ async function showNewChart() {
updateChart();
});
const autocolors = window["chartjs-plugin-autocolors"];
console.log(location.href);
console.log(canvas);
if (canvas) {
const res = await fetch(
`/sale/chart/data/line?${$("#chartFilter").serialize()}`
);
const data = await res.json();
console.log(data.labels);
chart = new Chart(canvas, {
type: "line",
data: {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment