Hello, I would like to know how I could execute an automatic action from a button in my odoo form
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello, I would like to know how I could execute an automatic action from a button in my odoo form
Hi,
Try this code:
def button_run_action(self):
action_id = self.env.context.get('automatic_action_id')
if action_id:
action = self.env['ir.cron'].sudo().search([('id', '=', action_id)
action.method_direct_trigger()
Hope it helps
관련 게시물 | 답글 | 화면 | 활동 | |
---|---|---|---|---|
|
1
3월 21
|
4606 | ||
|
3
3월 15
|
9658 | ||
|
0
8월 23
|
1713 | ||
|
2
2월 23
|
3145 | ||
|
1
12월 22
|
4991 |