Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
8478 Visninger

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'
     }

    

Avatar
Kassér
Bedste svar

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'
     }


Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
0
apr. 20
3205
7
jan. 24
152870
2
okt. 16
7146
2
sep. 23
6669
5
dec. 23
27168