Zum Inhalt springen

Welcome!

This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
1531 Ansichten

How to create

How to define / setup in odoo

Avatar
Verwerfen
Autor Beste Antwort

Need to make sure the field type is the same. Also should define if a field used in calculation is blank / missing, to use default value. 

If you want to use this on a report, needs to be indexed. If you want to use this on report and "Sum" of that filed on the report / list, then you need to store field. If field is stored, it won't calculated unless one of the input fields is changed. 


Define section: 

product_uom_qty, x_stndpricestockmove


Compute section: 

for record in self:

    if not record.product_uom_qty:

        record['x_totalcostsm'] = 0.00

    else:

        record['x_totalcostsm'] = record.product_uom_qty * record.x_stndpricestockmove




Avatar
Verwerfen