Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
8038 มุมมอง

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


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
เม.ย. 20
2977
7
ม.ค. 24
151958
compatibility odoo 9 to odoo 10 แก้ไขแล้ว
2
ต.ค. 16
6940
2
ก.ย. 23
6448
Selection field on odoo frontend แก้ไขแล้ว
5
ธ.ค. 23
26771