Skip to Content
Menu
This question has been flagged
1 Odpoveď
7134 Zobrazenia

I'm trying to create a pivot view of pricelists, which gives a clear report on every pricelists and their items. But as some of the fields in the 'product.pricelist.item' model is computed fields and not stored I cannot access them in pivot view. Can anybody give me an idea how to achieve this ?

Avatar
Zrušiť
Autor

Hi Kiran, I don't have enough points to add a comment to your answer so I'm writing my reply here. I had tried by adding the attribute 'store=True', but this makes all the existing data to be empty and once i edit and save them again the value is returned.

Best Answer

Hi , 

Computed fields which are not stored in database cannot be used in Pivot Views

add the attribute  store=True  

price_subtotal = fields.Monetary(string='Amount',
store=True, readonly=True, compute='_compute_subtotal')

Hope it Helps,
Kiran K

Avatar
Zrušiť

good- working

Related Posts Replies Zobrazenia Aktivita
0
nov 23
1697
1
feb 21
3861
1
júl 25
1896
2
jan 20
5248
4
máj 18
17671