Skip to content

Instantly share code, notes, and snippets.

@sehrishnaz
Created May 8, 2020 05:01
Show Gist options
  • Select an option

  • Save sehrishnaz/73c318a1c69f31a2459930cb2d7c9f98 to your computer and use it in GitHub Desktop.

Select an option

Save sehrishnaz/73c318a1c69f31a2459930cb2d7c9f98 to your computer and use it in GitHub Desktop.
Scheduled Actions In Odoo | Scheduler in Odoo
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="your_scheduler_action_id" model="ir.cron">
<field name="name">Name of your Scheduler Action</field>
<field name="user_id" ref="base.user_root"/>
<field name="interval_number">1</field>
<field name=" ">days</field>
<field name="numbercall">-1</field>
<field eval="False" name="doall"/>
<field name="nextcall" >2010-01-07 11:35:28</field> <!--Static-->
or
<field name="nextcall" eval="(datetime.now() + timedelta(days=10)).strftime('%Y-%m-%d 23:59:59')" /> <!--Dynamic-->
<field eval="'your.model'" name="model"/>
<field eval="'function_that_will_be_defined_in_above_model'" name="function"/>
</record>
</data>
</openerp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment