changeset 488f3c86d7bb in modules/sale:default
details: https://hg.tryton.org/modules/sale?cmd=changeset&node=488f3c86d7bb
description:
Add general reporting
Also inherit from the main view to reduce the number of XML files.
And add sum attribute to reporting with unique grouped lines.
issue10663
review350321002
diffstat:
CHANGELOG | 1 +
__init__.py | 2 +
sale_reporting.py | 22 +
sale_reporting.xml | 197
++++++++-
view/sale_reporting_country_subdivision_time_series_graph_number.xml | 11 -
view/sale_reporting_country_subdivision_time_series_graph_revenue.xml | 11 -
view/sale_reporting_country_time_series_graph_number.xml | 11 -
view/sale_reporting_country_time_series_graph_revenue.xml | 11 -
view/sale_reporting_customer_category_list.xml | 17 +-
view/sale_reporting_customer_category_time_series_graph_number.xml | 11 -
view/sale_reporting_customer_category_time_series_graph_revenue.xml | 11 -
view/sale_reporting_customer_graph_number.xml | 11 +-
view/sale_reporting_customer_graph_revenue.xml | 11 +-
view/sale_reporting_customer_list.xml | 11 +-
view/sale_reporting_customer_time_series_graph_number.xml | 11 -
view/sale_reporting_customer_time_series_graph_revenue.xml | 11 -
view/sale_reporting_main_graph_number.xml | 11 +
view/sale_reporting_main_graph_revenue.xml | 11 +
view/sale_reporting_main_list.xml | 8 +
view/sale_reporting_main_time_series_graph_number.xml | 11 +
view/sale_reporting_main_time_series_graph_revenue.xml | 11 +
view/sale_reporting_main_time_series_list.xml | 8 +
view/sale_reporting_product_category_list.xml | 17 +-
view/sale_reporting_product_category_time_series_graph_number.xml | 11 -
view/sale_reporting_product_category_time_series_graph_revenue.xml | 11 -
view/sale_reporting_product_graph_number.xml | 11 +-
view/sale_reporting_product_graph_revenue.xml | 11 +-
view/sale_reporting_product_list.xml | 11 +-
view/sale_reporting_product_time_series_graph_number.xml | 11 -
view/sale_reporting_product_time_series_graph_revenue.xml | 11 -
30 files changed, 304 insertions(+), 210 deletions(-)
diffs (830 lines):
diff -r 125ab979d3e3 -r 488f3c86d7bb CHANGELOG
--- a/CHANGELOG Sat Sep 04 09:47:24 2021 +0200
+++ b/CHANGELOG Sat Sep 04 19:30:02 2021 +0200
@@ -1,3 +1,4 @@
+* Add general reporting
* Add reporting per customer category
Version 6.0.0 - 2021-05-03
diff -r 125ab979d3e3 -r 488f3c86d7bb __init__.py
--- a/__init__.py Sat Sep 04 09:47:24 2021 +0200
+++ b/__init__.py Sat Sep 04 19:30:02 2021 +0200
@@ -35,6 +35,8 @@
configuration.ConfigurationSequence,
configuration.ConfigurationSaleMethod,
sale_reporting.Context,
+ sale_reporting.Main,
+ sale_reporting.MainTimeseries,
sale_reporting.Customer,
sale_reporting.CustomerTimeseries,
sale_reporting.CustomerCategory,
diff -r 125ab979d3e3 -r 488f3c86d7bb sale_reporting.py
--- a/sale_reporting.py Sat Sep 04 09:47:24 2021 +0200
+++ b/sale_reporting.py Sat Sep 04 19:30:02 2021 +0200
@@ -267,6 +267,28 @@
return Transaction().context.get('warehouse')
+class Main(Abstract, ModelView):
+ "Sale Reporting"
+ __name__ = 'sale.reporting.main'
+
+ time_series = fields.Function(fields.One2Many(
+ 'sale.reporting.main.time_series', None, "Time Series"),
+ 'get_time_series')
+
+ def get_rec_name(self, name):
+ return ''
+
+ def get_time_series(self, name):
+ pool = Pool()
+ Timeseries = pool.get('sale.reporting.main.time_series')
+ return [t.id for t in Timeseries.search([])]
+
+
+class MainTimeseries(AbstractTimeseries, ModelView):
+ "Sale Reporting"
+ __name__ = 'sale.reporting.main.time_series'
+
+
class CustomerMixin(object):
__slots__ = ()
customer = fields.Many2One(
diff -r 125ab979d3e3 -r 488f3c86d7bb sale_reporting.xml
--- a/sale_reporting.xml Sat Sep 04 09:47:24 2021 +0200
+++ b/sale_reporting.xml Sat Sep 04 19:30:02 2021 +0200
@@ -22,23 +22,163 @@
<field name="name">sale_reporting_context_form</field>
</record>
+ <!-- Main -->
+
+ <record model="ir.ui.view" id="reporting_main_view_list">
+ <field name="model">sale.reporting.main</field>
+ <field name="type">tree</field>
+ <field name="name">sale_reporting_main_list</field>
+ </record>
+
+ <record model="ir.ui.view" id="reporting_main_view_graph_revenue">
+ <field name="model">sale.reporting.main</field>
+ <field name="type">graph</field>
+ <field name="name">sale_reporting_main_graph_revenue</field>
+ </record>
+
+ <record model="ir.ui.view" id="reporting_main_view_graph_number">
+ <field name="model">sale.reporting.main</field>
+ <field name="type">graph</field>
+ <field name="name">sale_reporting_main_graph_number</field>
+ </record>
+
+ <record model="ir.action.act_window" id="act_reporting_main">
+ <field name="name">Sales</field>
+ <field name="res_model">sale.reporting.main</field>
+ <field name="context_model">sale.reporting.context</field>
+ </record>
+ <record model="ir.action.act_window.view"
id="act_reporting_main_view1">
+ <field name="sequence" eval="10"/>
+ <field name="view" ref="reporting_main_view_list"/>
+ <field name="act_window" ref="act_reporting_main"/>
+ </record>
+ <record model="ir.action.keyword" id="act_reporting_main_keyword1">
+ <field name="keyword">tree_open</field>
+ <field name="model" eval="'ir.ui.menu,%s' %
ref('menu_reporting_sale')"/>
+ <field name="action" ref="act_reporting_main"/>
+ </record>
+
+ <record model="ir.rule.group" id="rule_group_reporting_main_companies">
+ <field name="name">User in companies</field>
+ <field name="model" search="[('model', '=',
'sale.reporting.main')]"/>
+ <field name="global_p" eval="True"/>
+ </record>
+ <record model="ir.rule" id="rule_reporting_main_companies">
+ <field name="domain"
+ eval="[('company', 'in', Eval('companies', []))]"
+ pyson="1"/>
+ <field name="rule_group"
ref="rule_group_reporting_main_companies"/>
+ </record>
+
+ <record model="ir.model.access" id="access_reporting_main">
+ <field name="model" search="[('model', '=',
'sale.reporting.main')]"/>
+ <field name="perm_read" eval="False"/>
+ <field name="perm_write" eval="False"/>
+ <field name="perm_create" eval="False"/>
+ <field name="perm_delete" eval="False"/>
+ </record>
+ <record model="ir.model.access" id="access_reporting_main_sale">
+ <field name="model" search="[('model', '=',
'sale.reporting.main')]"/>
+ <field name="group" ref="group_sale"/>
+ <field name="perm_read" eval="True"/>
+ <field name="perm_write" eval="False"/>
+ <field name="perm_create" eval="False"/>
+ <field name="perm_delete" eval="False"/>
+ </record>
+
+ <record model="ir.ui.view" id="reporting_main_time_series_view_list">
+ <field name="model">sale.reporting.main.time_series</field>
+ <field name="type">tree</field>
+ <field name="name">sale_reporting_main_time_series_list</field>
+ </record>
+
+ <record model="ir.ui.view"
id="reporting_main_time_series_view_graph_revenue">
+ <field name="model">sale.reporting.main.time_series</field>
+ <field name="type">graph</field>
+ <field
name="name">sale_reporting_main_time_series_graph_revenue</field>
+ </record>
+
+ <record model="ir.ui.view"
id="reporting_main_time_series_view_graph_number">
+ <field name="model">sale.reporting.main.time_series</field>
+ <field name="type">graph</field>
+ <field
name="name">sale_reporting_main_time_series_graph_number</field>
+ </record>
+
+ <record model="ir.action.act_window"
id="act_reporting_main_time_series">
+ <field name="name">Sales</field>
+ <field name="res_model">sale.reporting.main.time_series</field>
+ <field name="context_model">sale.reporting.context</field>
+ <field name="order" eval="[('date', 'DESC')]" pyson="1"/>
+ </record>
+ <record model="ir.action.act_window.view"
id="act_reporting_main_time_series_list_view1">
+ <field name="sequence" eval="10"/>
+ <field name="view" ref="reporting_main_time_series_view_list"/>
+ <field name="act_window" ref="act_reporting_main_time_series"/>
+ </record>
+ <record model="ir.action.act_window.view"
id="act_reporting_main_time_series_list_view2">
+ <field name="sequence" eval="20"/>
+ <field name="view"
ref="reporting_main_time_series_view_graph_revenue"/>
+ <field name="act_window" ref="act_reporting_main_time_series"/>
+ </record>
+ <record model="ir.action.act_window.view"
id="act_reporting_main_time_series_list_view3">
+ <field name="sequence" eval="30"/>
+ <field name="view"
ref="reporting_main_time_series_view_graph_number"/>
+ <field name="act_window" ref="act_reporting_main_time_series"/>
+ </record>
+ <record model="ir.action.keyword"
id="act_reporting_main_time_series_list_keyword1">
+ <field name="keyword">tree_open</field>
+ <field name="model">sale.reporting.main,-1</field>
+ <field name="action" ref="act_reporting_main_time_series"/>
+ </record>
+
+ <record model="ir.rule.group"
id="rule_group_reporting_main_time_series_companies">
+ <field name="name">User in companies</field>
+ <field name="model" search="[('model', '=',
'sale.reporting.main.time_series')]"/>
+ <field name="global_p" eval="True"/>
+ </record>
+ <record model="ir.rule" id="rule_reporting_main_time_series_companies">
+ <field name="domain"
+ eval="[('company', 'in', Eval('companies', []))]"
+ pyson="1"/>
+ <field name="rule_group"
ref="rule_group_reporting_main_time_series_companies"/>
+ </record>
+
+ <record model="ir.model.access" id="access_reporting_main_time_series">
+ <field name="model" search="[('model', '=',
'sale.reporting.main.time_series')]"/>
+ <field name="perm_read" eval="False"/>
+ <field name="perm_write" eval="False"/>
+ <field name="perm_create" eval="False"/>
+ <field name="perm_delete" eval="False"/>
+ </record>
+ <record model="ir.model.access"
id="access_reporting_main_time_series_sale">
+ <field name="model" search="[('model', '=',
'sale.reporting.main.time_series')]"/>
+ <field name="group" ref="group_sale"/>
+ <field name="perm_read" eval="True"/>
+ <field name="perm_write" eval="False"/>
+ <field name="perm_create" eval="False"/>
+ <field name="perm_delete" eval="False"/>
+ </record>
+
<!-- Customer -->
<record model="ir.ui.view" id="reporting_customer_view_list">
<field name="model">sale.reporting.customer</field>
- <field name="type">tree</field>
+ <field name="type" eval="None"/>
+ <field name="inherit" ref="reporting_main_view_list"/>
<field name="name">sale_reporting_customer_list</field>
</record>
<record model="ir.ui.view" id="reporting_customer_view_graph_revenue">
<field name="model">sale.reporting.customer</field>
- <field name="type">graph</field>
+ <field name="type" eval="None"/>
+ <field name="inherit" ref="reporting_main_view_graph_revenue"/>
<field name="name">sale_reporting_customer_graph_revenue</field>
</record>
<record model="ir.ui.view" id="reporting_customer_view_graph_number">
<field name="model">sale.reporting.customer</field>
- <field name="type">graph</field>
+ <field name="type" eval="None"/>
+ <field name="inherit" ref="reporting_main_view_graph_number"/>
<field name="name">sale_reporting_customer_graph_number</field>
</record>
@@ -108,19 +248,19 @@
<record model="ir.ui.view"
id="reporting_customer_time_series_view_list">
<field name="model">sale.reporting.customer.time_series</field>
<field name="type">tree</field>
- <field name="name">sale_reporting_customer_time_series_list</field>
+ <field name="name">sale_reporting_main_time_series_list</field>
</record>
<record model="ir.ui.view"
id="reporting_customer_time_series_view_graph_revenue">
<field name="model">sale.reporting.customer.time_series</field>
<field name="type">graph</field>
- <field
name="name">sale_reporting_customer_time_series_graph_revenue</field>
+ <field
name="name">sale_reporting_main_time_series_graph_revenue</field>
</record>
<record model="ir.ui.view"
id="reporting_customer_time_series_view_graph_number">
<field name="model">sale.reporting.customer.time_series</field>
<field name="type">graph</field>
- <field
name="name">sale_reporting_customer_time_series_graph_number</field>
+ <field
name="name">sale_reporting_main_time_series_graph_number</field>
</record>
<record model="ir.action.act_window"
id="act_reporting_customer_time_series">
@@ -210,7 +350,8 @@
<record model="ir.ui.view" id="reporting_customer_category_view_list">
<field name="model">sale.reporting.customer.category</field>
- <field name="type">tree</field>
+ <field name="type" eval="None"/>
+ <field name="inherit" ref="reporting_main_view_list"/>
<field name="name">sale_reporting_customer_category_list</field>
</record>
@@ -265,19 +406,19 @@
<record model="ir.ui.view"
id="reporting_customer_category_time_series_view_list">
<field
name="model">sale.reporting.customer.category.time_series</field>
<field name="type">tree</field>
- <field
name="name">sale_reporting_customer_category_time_series_list</field>
+ <field name="name">sale_reporting_main_time_series_list</field>
</record>
<record model="ir.ui.view"
id="reporting_customer_category_time_series_view_graph_revenue">
<field
name="model">sale.reporting.customer.category.time_series</field>
<field name="type">graph</field>
- <field
name="name">sale_reporting_customer_category_time_series_graph_revenue</field>
+ <field
name="name">sale_reporting_main_time_series_graph_revenue</field>
</record>
<record model="ir.ui.view"
id="reporting_customer_category_time_series_view_graph_number">
<field
name="model">sale.reporting.customer.category.time_series</field>
<field name="type">graph</field>
- <field
name="name">sale_reporting_customer_category_time_series_graph_number</field>
+ <field
name="name">sale_reporting_main_time_series_graph_number</field>
</record>
<record model="ir.action.act_window"
id="act_reporting_customer_category_time_series">
@@ -343,19 +484,22 @@
<record model="ir.ui.view" id="reporting_product_view_list">
<field name="model">sale.reporting.product</field>
- <field name="type">tree</field>
+ <field name="type" eval="None"/>
+ <field name="inherit" ref="reporting_main_view_list"/>
<field name="name">sale_reporting_product_list</field>
</record>
<record model="ir.ui.view" id="reporting_product_view_graph_revenue">
<field name="model">sale.reporting.product</field>
- <field name="type">graph</field>
+ <field name="type" eval="None"/>
+ <field name="inherit" ref="reporting_main_view_graph_revenue"/>
<field name="name">sale_reporting_product_graph_revenue</field>
</record>
<record model="ir.ui.view" id="reporting_product_view_graph_number">
<field name="model">sale.reporting.product</field>
- <field name="type">graph</field>
+ <field name="type" eval="None"/>
+ <field name="inherit" ref="reporting_main_view_graph_number"/>
<field name="name">sale_reporting_product_graph_number</field>
</record>
@@ -425,19 +569,19 @@
<record model="ir.ui.view"
id="reporting_product_time_series_view_list">
<field name="model">sale.reporting.product.time_series</field>
<field name="type">tree</field>
- <field name="name">sale_reporting_product_time_series_list</field>
+ <field name="name">sale_reporting_main_time_series_list</field>
</record>
<record model="ir.ui.view"
id="reporting_product_time_series_view_graph_revenue">
<field name="model">sale.reporting.product.time_series</field>
<field name="type">graph</field>
- <field
name="name">sale_reporting_product_time_series_graph_revenue</field>
+ <field
name="name">sale_reporting_main_time_series_graph_revenue</field>
</record>
<record model="ir.ui.view"
id="reporting_product_time_series_view_graph_number">
<field name="model">sale.reporting.product.time_series</field>
<field name="type">graph</field>
- <field
name="name">sale_reporting_product_time_series_graph_number</field>
+ <field
name="name">sale_reporting_main_time_series_graph_number</field>
</record>
<record model="ir.action.act_window"
id="act_reporting_product_time_series">
@@ -526,7 +670,8 @@
<record model="ir.ui.view" id="reporting_product_category_view_list">
<field name="model">sale.reporting.product.category</field>
- <field name="type">tree</field>
+ <field name="type" eval="None"/>
+ <field name="inherit" ref="reporting_main_view_list"/>
<field name="name">sale_reporting_product_category_list</field>
</record>
@@ -581,19 +726,19 @@
<record model="ir.ui.view"
id="reporting_product_category_time_series_view_list">
<field
name="model">sale.reporting.product.category.time_series</field>
<field name="type">tree</field>
- <field
name="name">sale_reporting_product_category_time_series_list</field>
+ <field name="name">sale_reporting_main_time_series_list</field>
</record>
<record model="ir.ui.view"
id="reporting_product_category_time_series_view_graph_revenue">
<field
name="model">sale.reporting.product.category.time_series</field>
<field name="type">graph</field>
- <field
name="name">sale_reporting_product_category_time_series_graph_revenue</field>
+ <field
name="name">sale_reporting_main_time_series_graph_revenue</field>
</record>
<record model="ir.ui.view"
id="reporting_product_category_time_series_view_graph_number">
<field
name="model">sale.reporting.product.category.time_series</field>
<field name="type">graph</field>
- <field
name="name">sale_reporting_product_category_time_series_graph_number</field>
+ <field
name="name">sale_reporting_main_time_series_graph_number</field>
</record>
<record model="ir.action.act_window"
id="act_reporting_product_category_time_series">
@@ -712,19 +857,19 @@
<record model="ir.ui.view"
id="reporting_country_time_series_view_list">
<field name="model">sale.reporting.country.time_series</field>
<field name="type">tree</field>
- <field name="name">sale_reporting_country_time_series_list</field>
+ <field name="name">sale_reporting_main_time_series_list</field>
</record>
<record model="ir.ui.view"
id="reporting_country_time_series_view_graph_revenue">
<field name="model">sale.reporting.country.time_series</field>
<field name="type">graph</field>
- <field
name="name">sale_reporting_country_time_series_graph_revenue</field>
+ <field
name="name">sale_reporting_main_time_series_graph_revenue</field>
</record>
<record model="ir.ui.view"
id="reporting_country_time_series_view_graph_number">
<field name="model">sale.reporting.country.time_series</field>
<field name="type">graph</field>
- <field
name="name">sale_reporting_country_time_series_graph_number</field>
+ <field
name="name">sale_reporting_main_time_series_graph_number</field>
</record>
<record model="ir.action.act_window"
id="act_reporting_country_time_series">
@@ -783,19 +928,19 @@
<record model="ir.ui.view"
id="reporting_country_subdivision_time_series_view_list">
<field
name="model">sale.reporting.country.subdivision.time_series</field>
<field name="type">tree</field>
- <field
name="name">sale_reporting_country_subdivision_time_series_list</field>
+ <field name="name">sale_reporting_main_time_series_list</field>
</record>
<record model="ir.ui.view"
id="reporting_country_subdivision_time_series_view_graph_revenue">
<field
name="model">sale.reporting.country.subdivision.time_series</field>
<field name="type">graph</field>
- <field
name="name">sale_reporting_country_subdivision_time_series_graph_revenue</field>
+ <field
name="name">sale_reporting_main_time_series_graph_revenue</field>
</record>
<record model="ir.ui.view"
id="reporting_country_subdivision_time_series_view_graph_number">
<field
name="model">sale.reporting.country.subdivision.time_series</field>
<field name="type">graph</field>
- <field
name="name">sale_reporting_country_subdivision_time_series_graph_number</field>
+ <field
name="name">sale_reporting_main_time_series_graph_number</field>
</record>
<record model="ir.action.act_window"
id="act_reporting_country_subdivision_time_series">
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_country_subdivision_time_series_graph_number.xml
--- a/view/sale_reporting_country_subdivision_time_series_graph_number.xml
Sat Sep 04 09:47:24 2021 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
-this repository contains the full copyright notices and license terms. -->
-<graph>
- <x>
- <field name="date"/>
- </x>
- <y>
- <field name="number"/>
- </y>
-</graph>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_country_subdivision_time_series_graph_revenue.xml
--- a/view/sale_reporting_country_subdivision_time_series_graph_revenue.xml
Sat Sep 04 09:47:24 2021 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
-this repository contains the full copyright notices and license terms. -->
-<graph>
- <x>
- <field name="date"/>
- </x>
- <y>
- <field name="revenue"/>
- </y>
-</graph>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_country_time_series_graph_number.xml
--- a/view/sale_reporting_country_time_series_graph_number.xml Sat Sep 04
09:47:24 2021 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
-this repository contains the full copyright notices and license terms. -->
-<graph>
- <x>
- <field name="date"/>
- </x>
- <y>
- <field name="revenue"/>
- </y>
-</graph>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_country_time_series_graph_revenue.xml
--- a/view/sale_reporting_country_time_series_graph_revenue.xml Sat Sep 04
09:47:24 2021 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
-this repository contains the full copyright notices and license terms. -->
-<graph>
- <x>
- <field name="date"/>
- </x>
- <y>
- <field name="revenue"/>
- </y>
-</graph>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_customer_category_list.xml
--- a/view/sale_reporting_customer_category_list.xml Sat Sep 04 09:47:24
2021 +0200
+++ b/view/sale_reporting_customer_category_list.xml Sat Sep 04 19:30:02
2021 +0200
@@ -1,9 +1,14 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
-<tree keyword_open="1">
- <field name="category" expand="1"/>
- <field name="number"/>
- <field name="revenue"/>
- <field name="revenue_trend" expand="1"/>
-</tree>
+<data>
+ <xpath expr="//field[@name='number']" position="before">
+ <field name="category" expand="1"/>
+ </xpath>
+ <xpath expr="//field[@name='number']" position="replace">
+ <field name="number"/>
+ </xpath>
+ <xpath expr="//field[@name='revenue']" position="replace">
+ <field name="revenue"/>
+ </xpath>
+</data>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_customer_category_time_series_graph_number.xml
--- a/view/sale_reporting_customer_category_time_series_graph_number.xml
Sat Sep 04 09:47:24 2021 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
-this repository contains the full copyright notices and license terms. -->
-<graph>
- <x>
- <field name="date"/>
- </x>
- <y>
- <field name="number"/>
- </y>
-</graph>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_customer_category_time_series_graph_revenue.xml
--- a/view/sale_reporting_customer_category_time_series_graph_revenue.xml
Sat Sep 04 09:47:24 2021 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
-this repository contains the full copyright notices and license terms. -->
-<graph>
- <x>
- <field name="date"/>
- </x>
- <y>
- <field name="revenue"/>
- </y>
-</graph>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_customer_graph_number.xml
--- a/view/sale_reporting_customer_graph_number.xml Sat Sep 04 09:47:24
2021 +0200
+++ b/view/sale_reporting_customer_graph_number.xml Sat Sep 04 19:30:02
2021 +0200
@@ -1,11 +1,8 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
-<graph>
- <x>
+<data>
+ <xpath expr="//x/field[@name='id']" position="replace">
<field name="customer"/>
- </x>
- <y>
- <field name="number"/>
- </y>
-</graph>
+ </xpath>
+</data>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_customer_graph_revenue.xml
--- a/view/sale_reporting_customer_graph_revenue.xml Sat Sep 04 09:47:24
2021 +0200
+++ b/view/sale_reporting_customer_graph_revenue.xml Sat Sep 04 19:30:02
2021 +0200
@@ -1,11 +1,8 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
-<graph>
- <x>
+<data>
+ <xpath expr="//x/field[@name='id']" position="replace">
<field name="customer"/>
- </x>
- <y>
- <field name="revenue"/>
- </y>
-</graph>
+ </xpath>
+</data>
diff -r 125ab979d3e3 -r 488f3c86d7bb view/sale_reporting_customer_list.xml
--- a/view/sale_reporting_customer_list.xml Sat Sep 04 09:47:24 2021 +0200
+++ b/view/sale_reporting_customer_list.xml Sat Sep 04 19:30:02 2021 +0200
@@ -1,9 +1,8 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
-<tree keyword_open="1">
- <field name="customer" expand="1"/>
- <field name="number"/>
- <field name="revenue"/>
- <field name="revenue_trend" expand="1"/>
-</tree>
+<data>
+ <xpath expr="//field[@name='number']" position="before">
+ <field name="customer" expand="1"/>
+ </xpath>
+</data>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_customer_time_series_graph_number.xml
--- a/view/sale_reporting_customer_time_series_graph_number.xml Sat Sep 04
09:47:24 2021 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
-this repository contains the full copyright notices and license terms. -->
-<graph>
- <x>
- <field name="date"/>
- </x>
- <y>
- <field name="number"/>
- </y>
-</graph>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_customer_time_series_graph_revenue.xml
--- a/view/sale_reporting_customer_time_series_graph_revenue.xml Sat Sep
04 09:47:24 2021 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
-this repository contains the full copyright notices and license terms. -->
-<graph>
- <x>
- <field name="date"/>
- </x>
- <y>
- <field name="revenue"/>
- </y>
-</graph>
diff -r 125ab979d3e3 -r 488f3c86d7bb view/sale_reporting_main_graph_number.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/view/sale_reporting_main_graph_number.xml Sat Sep 04 19:30:02 2021 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<graph>
+ <x>
+ <field name="id"/>
+ </x>
+ <y>
+ <field name="number"/>
+ </y>
+</graph>
diff -r 125ab979d3e3 -r 488f3c86d7bb view/sale_reporting_main_graph_revenue.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/view/sale_reporting_main_graph_revenue.xml Sat Sep 04 19:30:02
2021 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<graph>
+ <x>
+ <field name="id"/>
+ </x>
+ <y>
+ <field name="revenue"/>
+ </y>
+</graph>
diff -r 125ab979d3e3 -r 488f3c86d7bb view/sale_reporting_main_list.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/view/sale_reporting_main_list.xml Sat Sep 04 19:30:02 2021 +0200
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<tree keyword_open="1">
+ <field name="number" sum="Number"/>
+ <field name="revenue" sum="Revenue"/>
+ <field name="revenue_trend" expand="1"/>
+</tree>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_main_time_series_graph_number.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/view/sale_reporting_main_time_series_graph_number.xml Sat Sep 04
19:30:02 2021 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<graph>
+ <x>
+ <field name="date"/>
+ </x>
+ <y>
+ <field name="number"/>
+ </y>
+</graph>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_main_time_series_graph_revenue.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/view/sale_reporting_main_time_series_graph_revenue.xml Sat Sep 04
19:30:02 2021 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<graph>
+ <x>
+ <field name="date"/>
+ </x>
+ <y>
+ <field name="revenue"/>
+ </y>
+</graph>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_main_time_series_list.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/view/sale_reporting_main_time_series_list.xml Sat Sep 04 19:30:02
2021 +0200
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<tree>
+ <field name="date"/>
+ <field name="number" sum="Number"/>
+ <field name="revenue" sum="Revenue"/>
+</tree>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_product_category_list.xml
--- a/view/sale_reporting_product_category_list.xml Sat Sep 04 09:47:24
2021 +0200
+++ b/view/sale_reporting_product_category_list.xml Sat Sep 04 19:30:02
2021 +0200
@@ -1,9 +1,14 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
-<tree keyword_open="1">
- <field name="category" expand="1"/>
- <field name="number"/>
- <field name="revenue"/>
- <field name="revenue_trend" expand="1"/>
-</tree>
+<data>
+ <xpath expr="//field[@name='number']" position="before">
+ <field name="category" expand="1"/>
+ </xpath>
+ <xpath expr="//field[@name='number']" position="replace">
+ <field name="number"/>
+ </xpath>
+ <xpath expr="//field[@name='revenue']" position="replace">
+ <field name="revenue"/>
+ </xpath>
+</data>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_product_category_time_series_graph_number.xml
--- a/view/sale_reporting_product_category_time_series_graph_number.xml Sat Sep
04 09:47:24 2021 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
-this repository contains the full copyright notices and license terms. -->
-<graph>
- <x>
- <field name="date"/>
- </x>
- <y>
- <field name="number"/>
- </y>
-</graph>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_product_category_time_series_graph_revenue.xml
--- a/view/sale_reporting_product_category_time_series_graph_revenue.xml
Sat Sep 04 09:47:24 2021 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
-this repository contains the full copyright notices and license terms. -->
-<graph>
- <x>
- <field name="date"/>
- </x>
- <y>
- <field name="revenue"/>
- </y>
-</graph>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_product_graph_number.xml
--- a/view/sale_reporting_product_graph_number.xml Sat Sep 04 09:47:24
2021 +0200
+++ b/view/sale_reporting_product_graph_number.xml Sat Sep 04 19:30:02
2021 +0200
@@ -1,11 +1,8 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
-<graph>
- <x>
+<data>
+ <xpath expr="//x/field[@name='id']" position="replace">
<field name="product"/>
- </x>
- <y>
- <field name="number"/>
- </y>
-</graph>
+ </xpath>
+</data>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_product_graph_revenue.xml
--- a/view/sale_reporting_product_graph_revenue.xml Sat Sep 04 09:47:24
2021 +0200
+++ b/view/sale_reporting_product_graph_revenue.xml Sat Sep 04 19:30:02
2021 +0200
@@ -1,11 +1,8 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
-<graph>
- <x>
+<data>
+ <xpath expr="//x/field[@name='id']" position="replace">
<field name="product"/>
- </x>
- <y>
- <field name="revenue"/>
- </y>
-</graph>
+ </xpath>
+</data>
diff -r 125ab979d3e3 -r 488f3c86d7bb view/sale_reporting_product_list.xml
--- a/view/sale_reporting_product_list.xml Sat Sep 04 09:47:24 2021 +0200
+++ b/view/sale_reporting_product_list.xml Sat Sep 04 19:30:02 2021 +0200
@@ -1,9 +1,8 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
-<tree keyword_open="1">
- <field name="product" expand="1"/>
- <field name="number"/>
- <field name="revenue"/>
- <field name="revenue_trend" expand="1"/>
-</tree>
+<data>
+ <xpath expr="//field[@name='number']" position="before">
+ <field name="product" expand="1"/>
+ </xpath>
+</data>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_product_time_series_graph_number.xml
--- a/view/sale_reporting_product_time_series_graph_number.xml Sat Sep 04
09:47:24 2021 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
-this repository contains the full copyright notices and license terms. -->
-<graph>
- <x>
- <field name="date"/>
- </x>
- <y>
- <field name="number"/>
- </y>
-</graph>
diff -r 125ab979d3e3 -r 488f3c86d7bb
view/sale_reporting_product_time_series_graph_revenue.xml
--- a/view/sale_reporting_product_time_series_graph_revenue.xml Sat Sep 04
09:47:24 2021 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
-this repository contains the full copyright notices and license terms. -->
-<graph>
- <x>
- <field name="date"/>
- </x>
- <y>
- <field name="revenue"/>
- </y>
-</graph>