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

I have a computed field that depends on a relation. Somewhere in my code I update this relation by accessing directly the database (self.env.cr.execute). My question is how can I force the recomputation afterwards ?

In v7 I used the _store_set_values function which worked like a charm. But now this method seems broken. Any other way of doing this in v8 ?

形象
丢弃

You can use the on_change function which will call automatically the function you need at the moment you click on a specific field. I can give you an example if you need.

编写者

I'm afraid the on_change function is not called after a database query. My question is not related to views and clicks.

编写者 最佳答案

The solution is trivial : just call the compute method of the fields needed to be refreshed. Sorry for this one.

形象
丢弃
相关帖文 回复 查看 活动
0
8月 15
3589
7
9月 20
7533
2
6月 18
16741
1
11月 17
4121
0
11月 16
4072