diff --git a/addons/sale/report/sale_report_views.xml b/addons/sale/report/sale_report_views.xml
index da8076b4787..03dfc64fbef 100644
--- a/addons/sale/report/sale_report_views.xml
+++ b/addons/sale/report/sale_report_views.xml
@@ -100,6 +100,7 @@
graph,pivot
+ [('state', '!=', 'cancel')]
{'search_default_Sales':1, 'group_by_no_leaf':1,'group_by':[], 'search_default_filter_order_date': 1}
This report performs analysis on your quotations and sales orders. Analysis check your sales revenues and sort it by different group criteria (salesman, partner, product, etc.) Use this report to perform analysis on sales not having invoiced yet. If you want to analyse your turnover, you should use the Invoice Analysis report in the Accounting application.
diff --git a/addons/web/static/src/views/graph/graph_controller.xml b/addons/web/static/src/views/graph/graph_controller.xml
index e9b0655ec04..b4c8bbe07aa 100644
--- a/addons/web/static/src/views/graph/graph_controller.xml
+++ b/addons/web/static/src/views/graph/graph_controller.xml
@@ -63,7 +63,7 @@
-
+
diff --git a/addons/web/static/tests/views/graph_view_tests.js b/addons/web/static/tests/views/graph_view_tests.js
index 7660416eaee..5af4602debe 100644
--- a/addons/web/static/tests/views/graph_view_tests.js
+++ b/addons/web/static/tests/views/graph_view_tests.js
@@ -3693,7 +3693,24 @@ QUnit.module("Views", (hooks) => {
assert.doesNotHaveClass(target, "o_view_sample_data");
assert.containsOnce(target, ".o_graph_canvas_container canvas");
- assert.containsNone(target, ".o_view_nocontent");
+ assert.containsOnce(target, ".o_view_nocontent");
+ });
+
+ QUnit.test("empty graph view without sample data after filter", async function (assert) {
+ await makeView({
+ serverData,
+ type: "graph",
+ resModel: "foo",
+ arch: `
+
+
+
+ `,
+ domain: Domain.FALSE.toList(),
+ noContentHelp: 'click to add a foo
',
+ });
+ assert.containsOnce(target, ".o_graph_canvas_container canvas");
+ assert.containsOnce(target, ".o_view_nocontent");
});
QUnit.test("reload chart with switchView button keep internal state", async function (assert) {