Odoo Help


How can i pass id of sale.shop to cron record?

on 11/18/14, 6:00 AM 963 views

I have hard coded the code of shop in view in line <field eval="'([7],)'" name="args"/>. I want to get this id from a return value of function. How can i do that?

<record model="ir.cron" id="salesorders_cron">
            <field name="name">sales orders automation</field>
            <field name="interval_number">30</field>
            <field name="interval_type">minutes</field>
            <field name="numbercall">-1</field>
            <field eval="False" name="doall"/>
            <field eval="'sale.shop'" name="model"/>
            <field eval="'automate_orders'" name="function"/>
            <field eval="'([7],)'" name="args"/>



If you have made shop from the xml file with its external id then you can try as like below.

<field eval="'([' + ref('external_id_of_shop') + '],)'" name="args"/>

I hope it will help you.

Thank you emipro tech

on 12/2/14, 11:01 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 11/18/14, 6:00 AM
Seen: 963 times
Last updated: 3/16/15, 8:10 AM