Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
5 ตอบกลับ
21109 มุมมอง

I'm trying to see if post_init_hook is possible for creation of ir.cron / Scheduled Action. If it is possible, how to create ir.cron / Scheduled Action in python? Thanks!

อวตาร
ละทิ้ง

Do you want to call your function in cron action?

ผู้เขียน

@Manish Kumar Bohra: Yes

คำตอบที่ดีที่สุด

Look into this: https://www.odoo.yenthevg.com/creating-automated-actions-in-odoo/

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello, 

You can move to Schedule Actions --> Select your cron 

Select Model --> sale.order(For Eg.)

Select Action To Do --> Execute Python Code

Below show a page (Python Code)

where you call your method like this model.method_name()

Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
scheduled tasks ir.cron stops working แก้ไขแล้ว
3
ต.ค. 24
12184
1
มี.ค. 23
5809
2
ธ.ค. 22
3354
1
มี.ค. 21
4059
1
มิ.ย. 20
4482