Hello everybody,
I'm on Odoo 10 and I'd like to save a computed field in database.
Firstly the field get value but in database is empty. Then I add a store=True.
The problem is that the field doesn't get value until I edit and save the field.
Can you help me to solve this problem?
Thanks.
Best regards
If you want to store your compute field in database, then there must be need of depends, based on which the compute function is evaluated. So whenever the values of depends field will be changed your function will executed and the value of your field will be updated. you need set store=True as attribute in field inside. @Yegendra Has given correct example to achieve your Goal.
I have already put the @api.depends. However the field still empty in DB.
I think the problem in the field that I depend on it, because is already setted.