Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
1305 Prikazi

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



Avatar
Opusti
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.

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
jan. 20
4716
0
mar. 25
2314
1
nov. 22
4058
0
nov. 21
2887
0
jun. 21
3825