[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.
This commit is contained in:
committed by
Géry Debongnie
parent
742476fb20
commit
47395c6e51
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user