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

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


Thank You!

形象
丢弃
最佳答案

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


形象
丢弃
编写者

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.

编写者

This commit is helpful. Thanks Nikhil.

相关帖文 回复 查看 活动
3
4月 24
2196
0
1月 24
1602
2
6月 23
4292
1
5月 23
3179
1
6月 25
14941