تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
2627 أدوات العرض

We use Odoo 15. I have an automation set up so that when a new Maintenance Request is created, an email should automatically be sent to every member of the Maintenance Team for which the request was created. However, it appears the automation is actually just posting the email template I created in the chatter on the request, and not actually sending the email. The Action menu item works for sending the email, but it should be automatic. Below is my automation setup.



الصورة الرمزية
إهمال
أفضل إجابة

Did u setup incoming mail and outgoing mail ? 

That's how i solved mine.

You can reach me on WhatsApp : +225 0545145391

الصورة الرمزية
إهمال
أفضل إجابة

Hi 
Create a function to do the automatic action

    def to_send_email(self):
        """ Action to send an email"""

       template = self.env.ref(
            'module_name.template_id')
        for rec in self.member_ids:
        //We get the maintenance team members
            template.send_mail(self.id, force_send=True,
                               email_values={'email_to': rec.login})
                               
                               
     def create(self):
      //  supering the maintenance creation function, you can call the to_send_email function into the create function  

Hope it hepls

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
فبراير 25
1524
Automation rules تم الحل
3
سبتمبر 24
3341
0
يوليو 23
1529
1
يوليو 25
1062
4
يونيو 25
1890