I am archiving a One2many field via code but it still shows until I manually refresh the screen.
Can my code trigger this refresh?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I am archiving a One2many field via code but it still shows until I manually refresh the screen.
Can my code trigger this refresh?
Just return a client reload action at the end of your code:
def your_method(self):
# your code ends with
self.action_archive()
# line to add
return { 'type': 'ir.actions.client', 'tag': 'reload' }
| 相關帖文 | 回覆 | 瀏覽次數 | 活動 | |
|---|---|---|---|---|
|
2
12月 22
|
13055 | |||
|
1
5月 22
|
3961 | |||
|
1
2月 22
|
2829 | |||
|
0
4月 20
|
4263 | |||
|
7
1月 24
|
155786 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.