diff options
| author | Mathieu Duckerts-Antoine <dam@odoo.com> | 2018-04-05 17:08:26 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2018-04-10 17:41:12 +0200 |
| commit | 47395c6e51ec82283d3cd46e386befc256d8a657 (patch) | |
| tree | ba8f89cdd2e46ccbe16635939ba3afe318922139 /addons/web/static/src/xml | |
| parent | 742476fb20e8183f96c42836552381fff259712c (diff) | |
[IMP] web: allow using many2one as measure in pivot view
With this commit, we add the possibility of using many2ones as measure.
The way a many2one is aggregated is by using the count distinct
operator.
Some care had to be done to gracefully support the situation when a
pivot view is grouped by a m2o field F, and the same field F is used as
a measure.
Diffstat (limited to 'addons/web/static/src/xml')
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index ccd98c10962..96f80c96eb2 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -527,7 +527,7 @@ </button> <ul class="dropdown-menu o_pivot_measures_list"> <li t-foreach="measures" t-as="measure" t-att-data-field="measure[0]"> - <a href="#"><t t-esc="measure[1].string"/></a> + <a href="#"><t t-esc="measure[1].string"/><t t-if="measure[1].type === 'many2one'"> (count)</t></a> </li> <li class="divider"></li> <li data-field="__count"><a href="#">Count</a></li> |
