I want to set ir.cron job but by default it is getting Odoobot as a user but I want to set logged in User as a ir.cron job user by default.
Because each user has his own token, so, while running scheduler, it gets none instead of token because the scheduler user is Odoobot.
Note:
As we can change user from scheduler in technical setting, in this case the other user also get the token of scheduler user. or we can create scheduler for each user separately. is there any way to handle this in a single scheduler.
I want just create a generic scheduler which work for each user.
<record id="office365_cron_do_tasts_import" model="ir.cron"> <field name="name">Auto Office365 tasks import</field> <field name="model_id" ref="model_sync_office365"/> <field name="state">code</field> <field name="active">0</field> <field name="code">model.auto_import_tasks()</field> <field name='interval_number'>5</field> <field name="user_id" ref="base.user_root"/> <field name='interval_type'>minutes</field> <field name="numbercall">-1</field> </record>
Odoo Tips: https://github.com/sehrishnaz/learnopenerp/wiki