Working on Odoo 10 community.
If I create a computed field:
quantity_ordered = fields.Float('Quantity Ordered')
price = fields.Float('Price', help='Item Unit Net Price')
price_total = fields.Float(string='Total Price', compute='_get_total_price')
@api.one
def _get_total_price(self):
self.price_total = self.price * self.quantity_ordered
I can display the price_total value in a form or tree view, but I cannot display it on a pivot as this:
<record id="dw_purchase_pivot" model="ir.ui.view">
<field name="name">dw.purchase.pivot</field>
<field name="model">dw.purchase</field>
<field name="arch" type="xml">
<pivot string="Purchase Orders">
<field name="partner" type="row"/>
<field name="delivery_date" type="col" />
<field name="price_total" type="measure" />
</pivot>
</field>
</record>
While price and quantity_ordered are displayed regularly.
The store attribute is not set, but nothing changes if I set store=False
Cannot figure out where I am going wrong, or is there any turnaround for this?