mass_mailing_demo.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <?xml version="1.0"?>
  2. <openerp>
  3. <data noupdate="1">
  4. <record id="mass_mail_attach_1" model="ir.attachment">
  5. <field name="datas">bWlncmF0aW9uIHRlc3Q=</field>
  6. <field name="datas_fname">SampleDoc.doc</field>
  7. <field name="name">SampleDoc.doc</field>
  8. </record>
  9. <!-- Create mailing lists -->
  10. <record id="mass_mail_list_2" model="mail.mass_mailing.list">
  11. <field name="name">Imported Contacts</field>
  12. </record>
  13. <!-- Create Contacts -->
  14. <record id="mass_mail_contact_1" model="mail.mass_mailing.contact">
  15. <field name="name">Aristide Antario</field>
  16. <field name="email">aa@example.com</field>
  17. <field name="list_id" ref="mass_mailing.mass_mail_list_2"/>
  18. </record>
  19. <record id="mass_mail_contact_2" model="mail.mass_mailing.contact">
  20. <field name="name">Beverly Bridge</field>
  21. <field name="email">bb@example.com</field>
  22. <field name="list_id" ref="mass_mailing.mass_mail_list_2"/>
  23. </record>
  24. <record id="mass_mail_contact_3" model="mail.mass_mailing.contact">
  25. <field name="name">Carol Cartridge</field>
  26. <field name="email">cc@example.com</field>
  27. <field name="list_id" ref="mass_mailing.mass_mail_list_2"/>
  28. <field name="opt_out" eval="True"/>
  29. </record>
  30. <!-- Demo newsletter template -->
  31. <!--Email template -->
  32. <record id="newsletter_template" model="email.template">
  33. <field name="name">Newsletter</field>
  34. <field name="subject">Newsletter</field>
  35. <field name="model_id" ref="mass_mailing.model_mail_mass_mailing_contact"/>
  36. <field name="use_default_to" eval="True"/>
  37. <field name="auto_delete" eval="True"/>
  38. <field name="body_html"><![CDATA[<div data-snippet-id="big-picture" style="padding:0px; margin:0px">
  39. <table cellpadding="0" cellspacing="0" style="margin:10px 0px 0px;vertical-align:top;padding:0px;font-family:arial;font-size:12px;color:rgb(51,51,51)">
  40. <tbody>
  41. <tr>
  42. <td style="width:600px" valign="top">
  43. <h2 style="text-align: center; padding:0px 5px">A Punchy Headline</h2>
  44. </td>
  45. </tr>
  46. <tr>
  47. <td style="width:600px" valign="top"><img src="/website/static/src/img/big_picture.png" style="display:block;border:none;min-height:250px;margin:0 auto;" width="500"></td>
  48. </tr>
  49. <tr>
  50. <td style="width:600px" valign="top">
  51. <p style="text-align: center; overflow:hidden"></p>
  52. <h3 style="text-align: center; padding:0px 5px">A Small Subtitle for ${object.name}</h3>
  53. <p></p>
  54. <p style="text-align: center; overflow:hidden">Choose a vibrant image and write an inspiring paragraph about it. It does not have to be long, but it should reinforce your image.</p>
  55. </td>
  56. </tr>
  57. </tbody>
  58. </table>
  59. </div>
  60. <div data-snippet-id="three-columns" style="padding:0px; margin:0px">
  61. <table cellpadding="0" cellspacing="0" style="margin:10px 0px 0px;vertical-align:top;padding:0px;font-family:arial;font-size:12px;color:rgb(51,51,51)">
  62. <tbody>
  63. <tr>
  64. <td style="width:300px" valign="top"><img src="/website/static/src/img/desert_thumb.jpg" style="display:block;border:none;min-height:50px" width="275"></td>
  65. <td style="width:300px" valign="top"><img src="/website/static/src/img/deers_thumb.jpg" style="display:block;border:none;min-height:50px" width="275"></td>
  66. </tr>
  67. <tr>
  68. <td style="width:300px" valign="top">
  69. <h3 style="text-align: center; padding:0px 5px">Feature One</h3>
  70. <p style="overflow:hidden">Choose a vibrant image and write an inspiring paragraph about it. It does not have to be long, but it should reinforce your image.</p>
  71. </td>
  72. <td style="width:300px" valign="top">
  73. <h3 style="text-align: center; padding:0px 5px">Feature Two</h3>
  74. <p style="overflow:hidden">Choose a vibrant image and write an inspiring paragraph about it. It does not have to be long, but it should reinforce your image.</p>
  75. </td>
  76. </tr>
  77. </tbody>
  78. </table>
  79. </div>]]></field>
  80. </record>
  81. <!-- Create campaign and mailings -->
  82. <record id="mass_mail_category_1" model="mail.mass_mailing.category">
  83. <field name="name">Marketing</field>
  84. </record>
  85. <record id="mass_mail_campaign_1" model="mail.mass_mailing.campaign">
  86. <field name="name">Newsletter</field>
  87. <field name="stage_id" ref="mass_mailing.campaign_stage_1"/>
  88. <field name="user_id" eval="ref('base.user_root')"/>
  89. <field name="category_ids" eval="[(6,0,[ref('mass_mailing.mass_mail_category_1')])]"/>
  90. </record>
  91. <record id="mass_mail_1" model="mail.mass_mailing">
  92. <field name="name">First Newsletter</field>
  93. <field name="state">done</field>
  94. <field name="sent_date" eval="(DateTime.today() - relativedelta(days=5)).strftime('%Y-%m-%d %H:%M:%S')"/>
  95. <field name="mass_mailing_campaign_id" eval="ref('mass_mail_campaign_1')"/>
  96. <field name="mailing_model">res.partner</field>
  97. <field name="mailing_domain">[('customer', '=', True)]</field>
  98. <field name="reply_to_mode">email</field>
  99. <field name="reply_to"><![CDATA[Info <info@yourcompany.example.com>]]></field>
  100. <field name="body_html"><![CDATA[<div data-snippet-id="big-picture" style="padding:0px; margin:0px">
  101. <table cellpadding="0" cellspacing="0" style="margin:10px 0px 0px;vertical-align:top;padding:0px;font-family:arial;font-size:12px;color:rgb(51,51,51)">
  102. <tbody>
  103. <tr>
  104. <td style="width:600px" valign="top">
  105. <h2 style="text-align: center; padding:0px 5px">A Punchy Headline</h2>
  106. </td>
  107. </tr>
  108. <tr>
  109. <td style="width:600px" valign="top"><img src="/website/static/src/img/big_picture.png" style="display:block;border:none;min-height:250px;margin:0 auto;" width="500"></td>
  110. </tr>
  111. <tr>
  112. <td style="width:600px" valign="top">
  113. <p style="text-align: center; overflow:hidden"></p>
  114. <h3 style="text-align: center; padding:0px 5px">A Small Subtitle for ${object.name}</h3>
  115. <p></p>
  116. <p style="text-align: center; overflow:hidden">Choose a vibrant image and write an inspiring paragraph about it. It does not have to be long, but it should reinforce your image.</p>
  117. </td>
  118. </tr>
  119. </tbody>
  120. </table>
  121. </div>
  122. <div data-snippet-id="three-columns" style="padding:0px; margin:0px">
  123. <table cellpadding="0" cellspacing="0" style="margin:10px 0px 0px;vertical-align:top;padding:0px;font-family:arial;font-size:12px;color:rgb(51,51,51)">
  124. <tbody>
  125. <tr>
  126. <td style="width:300px" valign="top"><img src="/website/static/src/img/desert_thumb.jpg" style="display:block;border:none;min-height:50px" width="275"></td>
  127. <td style="width:300px" valign="top"><img src="/website/static/src/img/deers_thumb.jpg" style="display:block;border:none;min-height:50px" width="275"></td>
  128. </tr>
  129. <tr>
  130. <td style="width:300px" valign="top">
  131. <h3 style="text-align: center; padding:0px 5px">Feature One</h3>
  132. <p style="overflow:hidden">Choose a vibrant image and write an inspiring paragraph about it. It does not have to be long, but it should reinforce your image.</p>
  133. </td>
  134. <td style="width:300px" valign="top">
  135. <h3 style="text-align: center; padding:0px 5px">Feature Two</h3>
  136. <p style="overflow:hidden">Choose a vibrant image and write an inspiring paragraph about it. It does not have to be long, but it should reinforce your image.</p>
  137. </td>
  138. </tr>
  139. </tbody>
  140. </table>
  141. </div>]]></field>
  142. <field name="attachment_ids" eval="[(4, ref('mass_mail_attach_1'))]"/>
  143. </record>
  144. <record id="mass_mail_2" model="mail.mass_mailing">
  145. <field name="name">Second Newsletter</field>
  146. <field name="state">test</field>
  147. <field name="mass_mailing_campaign_id" eval="ref('mass_mail_campaign_1')"/>
  148. <field name="mailing_model">res.partner</field>
  149. <field name="mailing_domain">[('customer', '=', True)]</field>
  150. <field name="reply_to_mode">email</field>
  151. <field name="reply_to"><![CDATA[Info <info@yourcompany.example.com>]]></field>
  152. </record>
  153. <record id="mass_mail_email_1" model="mail.mail.statistics">
  154. <field name="mass_mailing_id" eval="ref('mass_mail_1')"/>
  155. <field name="message_id">1111000@OpenERP.com</field>
  156. <field name="sent" eval="(DateTime.today() - relativedelta(days=5)).strftime('%Y-%m-%d %H:%M:%S')"/>
  157. <field name="opened" eval="(DateTime.today() - relativedelta(days=2)).strftime('%Y-%m-%d %H:%M:%S')"/>
  158. <field name="replied" eval="(DateTime.today() - relativedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S')"/>
  159. </record>
  160. <record id="mass_mail_email_2" model="mail.mail.statistics">
  161. <field name="mass_mailing_id" eval="ref('mass_mail_1')"/>
  162. <field name="message_id">1111001@OpenERP.com</field>
  163. <field name="sent" eval="(DateTime.today() - relativedelta(days=5)).strftime('%Y-%m-%d %H:%M:%S')"/>
  164. <field name="opened" eval="(DateTime.today() - relativedelta(days=2)).strftime('%Y-%m-%d %H:%M:%S')"/>
  165. <field name="replied" eval="(DateTime.today() - relativedelta(days=0)).strftime('%Y-%m-%d %H:%M:%S')"/>
  166. </record>
  167. <record id="mass_mail_email_3" model="mail.mail.statistics">
  168. <field name="mass_mailing_id" eval="ref('mass_mail_1')"/>
  169. <field name="message_id">1111002@OpenERP.com</field>
  170. <field name="sent" eval="(DateTime.today() - relativedelta(days=5)).strftime('%Y-%m-%d %H:%M:%S')"/>
  171. <field name="opened" eval="(DateTime.today() - relativedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S')"/>
  172. </record>
  173. <record id="mass_mail_email_4" model="mail.mail.statistics">
  174. <field name="mass_mailing_id" eval="ref('mass_mail_1')"/>
  175. <field name="message_id">1111003@OpenERP.com</field>
  176. <field name="exception" eval="(DateTime.today() - relativedelta(days=5)).strftime('%Y-%m-%d %H:%M:%S')"/>
  177. </record>
  178. <record id="mass_mail_email_5" model="mail.mail.statistics">
  179. <field name="mass_mailing_id" eval="ref('mass_mail_1')"/>
  180. <field name="message_id">1111004@OpenERP.com</field>
  181. <field name="sent" eval="(DateTime.today() - relativedelta(days=5)).strftime('%Y-%m-%d %H:%M:%S')"/>
  182. <field name="bounced" eval="(DateTime.today() - relativedelta(days=3)).strftime('%Y-%m-%d %H:%M:%S')"/>
  183. </record>
  184. </data>
  185. </openerp>