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
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
Registrati| Post correlati | Risposte | Visualizzazioni | Attività | |
|---|---|---|---|---|
|
1
mar 21
|
5599 | |||
|
3
mar 15
|
11202 | |||
|
0
ago 23
|
2602 | |||
|
2
feb 23
|
4359 | |||
|
1
dic 22
|
6002 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.