+4 votes
117 views

how can I schedule imports in odoo? Basically i need to import  xlsx file to contacts section of odoo every 2 hours.

Since i'm fairly new to python i'm trying to find a way that doesn't involve a lot of coding.

I'm using odoo version 12.0

closed with the note: Solution worked
in Back-end by (10.5k points)
closed by | 117 views

1 Answer

+4 votes
Best answer

You can make "Scheduled Actions"

    <?xml version="1.0" encoding="utf-8"?>
    <odoo>
        <data noupdate="0">
            <record id="scheduler_id" model="ir.cron">
                <field name="name">Scheduler Name</field>
                <field eval="True" name="active"/>
                <field name="user_id" ref="base.user_root"/>
                <field name="interval_number">2</field>
                <field name="interval_type">hours</field>
                <field name="numbercall">-1</field>
                <field eval="False" name="doall"/>
                <field name="state">code</field>
                <field name="model_id" ref="model_name"/>
                <field name="code">action = env["model.name"].process_scheduler_queue()</field>
            </record>
       </data>
    </odoo>
*
by (5k points)
selected by
Thanks for the answer it worked
202 questions
179 answers
35 comments
175,268 users