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

I can not understand when and how precompute=True can be used in computed fields. What difference does it make?


Thank You!

Avatar
Opusti
Best Answer

Hi Karan BK,

Odoo16: Add precompute=True option in your Computed fields to compute value before Record Create, UpTo 15.0 version Computed field value was computed after Record Create.

If you need more information then:

  • whether the field should be computed before record insertion in database. Should be used to specify manually some fields as precompute=True when the field can be computed before record insertion.
  • Inside odoo documatation ctrl+F and search precompute=True .
  • https://www.odoo.com/documentation/16.0


Thank you


Avatar
Opusti
Avtor

Hello Nikhil,
I have gone through the documentation and I know by setting precompute=True, computed fields will be computed before record create. But what I wanted to know is what difference does it make when computation is done before or after record create. When we should set precompute=True on a computed field and what is the purpose of using it.

Avtor

This commit is helpful. Thanks Nikhil.

Related Posts Odgovori Prikazi Aktivnost
3
apr. 24
2347
0
jan. 24
1772
2
jun. 23
4570
1
maj 23
3431
1
jun. 25
15281