Hello,
I want to create schedule action for the button send by email in invoicing for customer every month, How can I do that.
Thanks in advance for any help.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello,
I want to create schedule action for the button send by email in invoicing for customer every month, How can I do that.
Thanks in advance for any help.
Hi,
Create schedule action with the button click function.
<data noupdate="1">
<record id="ir_cron_scheduler_recurring_action" model="ir.cron">
<field name="name">Recurring Todo Activity</field>
<field name="model_id" ref="model_mail_activity"/>
<field name="state">code</field>
<field name="code">model.action_done()</field>
<field name="user_id" ref="base.user_root"/>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
</record>
</data>
Change the interval type as days/months
For creating email template please go through this blog
https://www.cybrosys.com/blog/creating-email-templates-in-odoo-15
Create python function to send email through button function
def action_done(self):
mail_template = self.env.ref("module_name.email_template_name")
mail_template_send_mail(self.id,force_send=True)
Regards
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
How to ORDER BY? [Odoo 10]
Solved
|
|
2
Nov 24
|
25098 | |
|
2
May 24
|
5524 | ||
|
3
Mar 24
|
4964 | ||
|
0
Mar 24
|
264 | ||
|
3
Feb 24
|
11421 |