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

Odoo 10

Hi,

In form view of model 'AM' I have O2M field to model 'BM'. In this tree view I have button with connected method 'connected_method' which changes values of field 'state' in form view of model 'AM'. The problem is that I don't see change on frontend, but there is change in database! When I refreshes (F5) page then the changes outcome. Now I am returning action with tag 'reload', but it is soo slow. Is there any better solution which not reloads whole page, but only necessary fields?

connected method:

def connected_method(self):
     self.field_model_am.state = 'done'
     return {
         'type': 'ir.actions.client',
         'tag': 'reload'
     }

    

形象
丢弃
最佳答案

hello ,

You can use soft_reload instead of reload, it essentially refreshes the current page without a complete page reload.

 return {
         'type': 'ir.actions.client',
         'tag': 'soft_reload'
     }


形象
丢弃
相关帖文 回复 查看 活动
0
4月 20
2647
7
1月 24
151071
2
10月 16
6713
2
9月 23
6105
5
12月 23
26377