Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
rex wu
odoo
Commits
1bca7a21
Commit
1bca7a21
authored
1 year ago
by
昱翔 曾
Browse files
Options
Download
Email Patches
Plain Diff
fix(sales-chart): remove unneeded code
parent
a9150969
15.0
deploy
feat-bom2topurchase
feat-cost_chart
feat-requisition
project
3 merge requests
!61
15.0
,
!60
Feat cost chart
,
!58
Add security settings and remove debug code
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
extra-addons/sales/models/__init__.py
+0
-1
extra-addons/sales/models/__init__.py
extra-addons/sales/models/report_chart_model.py
+0
-15
extra-addons/sales/models/report_chart_model.py
extra-addons/sales/static/src/js/sale_report_chart.js
+0
-3
extra-addons/sales/static/src/js/sale_report_chart.js
with
0 additions
and
19 deletions
+0
-19
extra-addons/sales/models/__init__.py
+
0
-
1
View file @
1bca7a21
...
...
@@ -4,4 +4,3 @@
from
.
import
inquiry_model
from
.
import
sale_order_model
from
.
import
sale_order_line_model
from
.
import
report_chart_model
This diff is collapsed.
Click to expand it.
extra-addons/sales/models/report_chart_model.py
deleted
100644 → 0
+
0
-
15
View file @
a9150969
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
)
This diff is collapsed.
Click to expand it.
extra-addons/sales/static/src/js/sale_report_chart.js
+
0
-
3
View file @
1bca7a21
...
...
@@ -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
:
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help