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
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
action button is disabled in the list view
Diselesaikan
|
|
1
Mar 21
|
4595 | |
|
3
Mar 15
|
9640 | ||
|
0
Agu 23
|
1706 | ||
|
2
Feb 23
|
3136 | ||
|
1
Des 22
|
4985 |