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
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-se| Publicações relacionadas | Respostas | Visualizações | Atividade | |
|---|---|---|---|---|
|
1
mar. 21
|
5599 | |||
|
3
mar. 15
|
11202 | |||
|
0
ago. 23
|
2602 | |||
|
2
fev. 23
|
4359 | |||
|
1
dez. 22
|
6002 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.