This question has been flagged
1 Reply
3382 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"/>

Avatar
Discard
Best Answer

Hi,

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.

Avatar
Discard
Author

Thank you emipro tech