Skip to Content
Menu
This question has been flagged

I have 6 email templates all are almost similar content but various model.


Template Record 1:
     <record id="customer_email_template" model="mail.template">    

    <field name="name">Customer Email Template</field>  

         <field name="model_id" ref="model_customer"/>       

   <field name="email_from">${object.related_user_id.company_id and object.related_user_id.company_id.email or    ''}          </field>               

   <field name="subject">Remainder mail for Customer Document    expiration date            </field>      

       <field name="email_to">${object.related_user_id.partner_id.email}       </field>        

           <field name="lang">${object.lang}</field>      

    <field name="auto_delete" eval="True"/>             

      <field name="body_html">           

       <![CDATA[                   <p> Dear ${object.related_user_id.name}, <br/>          

          Document name: ${object.doc_name},<br/>                  

  Document number: ${(object.doc_number)},<br/> Date: ${(object.date)},<br/>      

                      Document expiration date: ${(object.doc_expiration_date)} ,<br/></p>                                    Regards,<br/>                   ]]>            

   </field>       

   </record>


Template Record 2:


      <record id="operating_email_template" model="mail.template">   

  <field name="name">Operating Email Template</field>   

  <field name="model_id" ref="model_operating"/>    

     --- content same as above template ---     

</record>   

  Like this i have 6 templates same mail body content but different model.
My query is   How to Email templates abstracted and inherited with primary=True  ?

Avatar
Discard
Related Posts Replies Views Activity
1
Sep 18
106
1
May 17
7397
2
Dec 24
57
0
Jul 24
276
2
Nov 23
5923