Skip to Content
Menu
This question has been flagged
1 Atsakyti
1228 Rodiniai

We really need to be able to do cross model pivots. The ability to pull referenced fields from another model. Right now it seems pivot tables cannot access related fields in other models. This is a HUGE limitation and makes adding custom fields much less useful.

The export tool can access data cross model just fine...


Example:

Sales Order pivot table that shows QTY of items sold by month, by x_studio_PRODUCT_CUSTOM, by part number

x_studio_PRODUCT_CUSTOM
Part #QTY Sold
MayTransmitter
A12333
B123785
Lock
G45612
E45658
JuneTransmitter
A12312
B123434
Lock
G45634
E456464



Portretas
Atmesti
Best Answer

Hi,


To enable cross-model pivot reporting in Odoo:


    Inherit the existing pivot view and add stored related fields (store=True); refer this blog: https://www.cybrosys.com/blog/how-to-inherit-an-existing-pivot-view-report-in-odoo-18


    Create a custom pivot report using an SQL view that joins multiple models; refer this blog: https://www.cybrosys.com/blog/how-to-create-pivot-report-using-query-in-odoo-18


This effectively overcomes the limitation of Odoo core pivot views not supporting related fields across models and can be fully customized for your use case.


Hope it helps.

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
saus. 20
4661
0
kov. 25
2251
1
lapkr. 22
3981
0
lapkr. 21
2827
0
birž. 21
3766