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

hi all i have a question regarding cron jobs in odoo12 ,,, i know how to create one i have set the "action to do" to "Execute python code" ,,, but can anyone explain me with some examples for other actions that are ther like:

1: create a new record
2: update a record
3: execute several action
etc ,,, i dont know how to add python code for them i mean what we can do to perform these taks ,,,,

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

partner_name = record.name + '_code'

env['res.partner'].create({'name': partner_name})


This is simple python code that will create new partner record.

อวตาร
ละทิ้ง

For update and execute other action are also can be achieved by defining python code in server action.