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
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
Aanmelden| Gerelateerde posts | Antwoorden | Weergaven | Activiteit | |
|---|---|---|---|---|
|
1
mrt. 21
|
5599 | |||
|
3
mrt. 15
|
11205 | |||
|
0
aug. 23
|
2602 | |||
|
2
feb. 23
|
4360 | |||
|
1
dec. 22
|
6003 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.