Hello!!
Friends, i have developped a function that works after clicking on a button.
But now i want my function working automatically without clicking on any button.
Does anyone have any suggestion please.
Thanks a lot in advance.
Best Regards.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello!!
Friends, i have developped a function that works after clicking on a button.
But now i want my function working automatically without clicking on any button.
Does anyone have any suggestion please.
Thanks a lot in advance.
Best Regards.
Hi Drees,
You'll need to create an automated action that calls a Python function every time the scheduler runs. An automated action example:
The Python code:<record id="ir_cron_scheduler_demo_action" model="ir.cron"> <field name="name">Demo action</field> <field name="user_id" ref="base.user_root"/> <field name="interval_number">2</field> <field name="interval_type">minutes</field> <field name="numbercall">-1</field> <field eval="False" name="doall"/> <field eval="'Your.mode'" name="model"/> <field eval="'process_demo_scheduler_queue'" name="function"/> </record>
#This function is called when the scheduler goes off
def process_demo_scheduler_queue(self, cr, uid, context=None): #Your custom code here.
Yenthe
@Yenthe my friend, thanks a lot for your answer but i am working with odoo9 and i have got this error:TypeError: old_api() takes at least 4 arguments (3 given)
@Drees this should work fine on V9, this example is working on my V9 environments. Have a look at my example module, which you can find here: https://github.com/Yenthe666/Odoo_Samples/tree/master/scheduler_demo
Hello Dress,
You can also add functional filed in view so that each time your function will be called when view is opened.
Thanks
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Feb 17
|
2289 | ||
|
1
Jan 16
|
5756 | ||
|
4
Jul 20
|
7820 | ||
|
0
Dec 19
|
3359 | ||
|
0
Jun 18
|
3195 |