跳至内容
菜单
此问题已终结
1 回复
1214 查看

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



形象
丢弃
最佳答案

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.

形象
丢弃
相关帖文 回复 查看 活动
2
1月 20
4653
0
3月 25
2240
1
11月 22
3970
0
11月 21
2822
0
6月 21
3755