İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
1489 Görünümler
Hello, I would like to know how I could execute an automatic action from a button in my odoo form


Avatar
Vazgeç
En İyi Yanıt

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

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Mar 21
4583
3
Mar 15
9633
0
Ağu 23
1699
2
Şub 23
3127
1
Ara 22
4980