Hello,
I have created an automated action in Odoo, to update the records every 1 minute.
My problem is that the automated action don't update the records. i don't see any changes.
How i can resolve that please. Thank you
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello,
I have created an automated action in Odoo, to update the records every 1 minute.
My problem is that the automated action don't update the records. i don't see any changes.
How i can resolve that please. Thank you
Hi zakaria,
I hope you need a scheduled action to occur every 1 minute. For this first you need to create a record in ir.cron model.
this can be achieved using the xml code below.here you need to provide the time interval , the name of function with automated action and the model name in which you have defined this function. If you have followed this same method and still fails then please post your code so that i can go through.
<record model="ir.cron" id="trial_reminder">
<field name="name">Sample code</field>
<field name="interval_number">1</field>
<field name="interval_type">minutes</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False"/>
<field name="model" eval="'function.model.name'"/>
<field name="function" eval="'my_function'"/>
<field name="args" eval="'()'" />
</record>
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
Hi Zak,
are you sure that it enters the Python function ? without adding the relevant part of python code, the problem cannot be identified
Hi niyas, that is my code of the fucntion , i don't know if is correct :
@api.model
def process_demo_scheduler_queue2(self, cr, uid, ids=False, context=None):
for record in self.browse(cr, uid, ids, context=context):
numberOfUpdates = record.numberOfUpdates
self.write({'numberOfUpdates': (numberOfUpdates + 1)})