Search Here

How to create scheduled action in odoo

Today I am going to show you how to create scheduled action in odoo. Scheduled action are also called cron job or automated action. In this tutorial I will show you how to create cron jobs and trigger some events like (send emails, create and delete some records, checking your stocks, synchronizations and much more.)


Scheduled Actions In Odoo | Scheduler in Odoo
Scheduled Action

What is Scheduled Action in Odoo

In Odoo Schedulers are automated or computerized activities, than can trigger on some given time span and can perform some activities without human interaction as I mentioned above.

How to play with scheduled action


Following are the steps to create scheduled action.
  • Create an XML file and give any name (any name) to that file
  • Copy and paste below code in above created file
  • Set scheduler to execute a specific function at given intervals
  • Create function (as mentioned above step) in your python code, that will perform your desired activities without human impedance.


Code Description


Field Desciption
name Name of the job
active Can activate or deactivate job scheduler
priority The priority of the job as an integer:0 indicates high priority on the other hand 10 means lower priority
nextcall Next planned execution date of this job
interval_number Repeat every given interval
interval_type Unit of interval : (minutes,hours,work_days,days,weeks and months)
numbercall How many times the function is called. A negative number indicates no limit
numbercall How many times the function is called. A negative number indicates no limit
model Model on which the survey action runs
function A python function name that will be executed on a specific time span

Don,t forgot to share, keep sharing keep learning

Post a Comment

0 Comments