mass_mailing.xml 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  1. <?xml version="1.0"?>
  2. <openerp>
  3. <data>
  4. <template id="assets_backend" name="mass_mailing assets" inherit_id="web.assets_backend">
  5. <xpath expr="." position="inside">
  6. <link rel="stylesheet" href="/mass_mailing/static/src/css/mass_mailing.css"/>
  7. <link rel="stylesheet" href="/mass_mailing/static/src/css/email_template.css"/>
  8. <script type="text/javascript" src="/mass_mailing/static/src/js/mass_mailing.js"></script>
  9. </xpath>
  10. </template>
  11. <!-- Marketing / Mass Mailing -->
  12. <menuitem name="Mass Mailing" id="mass_mailing_campaign"
  13. parent="base.marketing_menu" sequence="1"/>
  14. <!-- Marketing / Mailing Lists -->
  15. <menuitem name="Mailing Lists" id="mass_mailing_list"
  16. parent="base.marketing_menu" sequence="2"/>
  17. <!-- Marketing / Configuration -->
  18. <menuitem name="Configuration" id="marketing_configuration"
  19. parent="base.marketing_menu" sequence="99"/>
  20. <!-- MAIL MAIL STATISTICS !-->
  21. <record model="ir.ui.view" id="view_mail_mail_statistics_search">
  22. <field name="name">mail.mail.statistics.search</field>
  23. <field name="model">mail.mail.statistics</field>
  24. <field name="arch" type="xml">
  25. <search string="Mail Statistics">
  26. <field name="mail_mail_id_int"/>
  27. <field name="message_id"/>
  28. <field name="mass_mailing_id"/>
  29. <filter string="Received" name="filter_received" domain="[('sent', '!=', False), ('bounced', '=', False)]"/>
  30. <filter string="Opened" name="filter_opened" domain="[('opened', '!=', False)]"/>
  31. <filter string="Replied" name="filter_replied" domain="[('replied', '!=', False)]"/>
  32. <group expand="0" string="Group By">
  33. <filter string="Open Date" name="group_open_date" context="{'group_by': 'opened:day'}"/>
  34. <filter string="Reply Date" name="group_reply_date" context="{'group_by': 'replied:day'}"/>
  35. </group>
  36. </search>
  37. </field>
  38. </record>
  39. <record model="ir.ui.view" id="view_mail_mail_statistics_tree">
  40. <field name="name">mail.mail.statistics.tree</field>
  41. <field name="model">mail.mail.statistics</field>
  42. <field name="arch" type="xml">
  43. <tree string="Mail Statistics">
  44. <field name="mail_mail_id_int"/>
  45. <field name="message_id"/>
  46. <field name="sent"/>
  47. <field name="exception"/>
  48. <field name="opened"/>
  49. <field name="replied"/>
  50. <field name="bounced"/>
  51. </tree>
  52. </field>
  53. </record>
  54. <record model="ir.ui.view" id="view_mail_mail_statistics_form">
  55. <field name="name">mail.mail.statistics.form</field>
  56. <field name="model">mail.mail.statistics</field>
  57. <field name="arch" type="xml">
  58. <form string="Mail Statistics">
  59. <group>
  60. <group>
  61. <field name="mail_mail_id"/>
  62. <field name="mail_mail_id_int"/>
  63. <field name="message_id"/>
  64. <field name="exception"/>
  65. <field name="sent"/>
  66. <field name="opened"/>
  67. <field name="replied"/>
  68. <field name="bounced"/>
  69. </group>
  70. <group>
  71. <field name="mass_mailing_id"/>
  72. <field name="mass_mailing_campaign_id"/>
  73. <field name="model"/>
  74. <field name="res_id"/>
  75. </group>
  76. </group>
  77. </form>
  78. </field>
  79. </record>
  80. <record id="action_view_mail_mail_statistics" model="ir.actions.act_window">
  81. <field name="name">Mail Statistics</field>
  82. <field name="res_model">mail.mail.statistics</field>
  83. <field name="view_type">form</field>
  84. <field name="view_mode">tree,form</field>
  85. </record>
  86. <record id="action_view_mail_mail_statistics_mailing" model="ir.actions.act_window">
  87. <field name="name">Mail Statistics</field>
  88. <field name="res_model">mail.mail.statistics</field>
  89. <field name="view_type">form</field>
  90. <field name="view_mode">tree,form</field>
  91. <field name="context">{'search_default_mass_mailing_id': active_id}</field>
  92. </record>
  93. <!-- Add in Technical/Email -->
  94. <menuitem name="Mail Statistics" id="menu_email_statistics"
  95. parent="base.menu_email" sequence="50"
  96. action="action_view_mail_mail_statistics"/>
  97. <!-- MASS MAILING CONTACT -->
  98. <record model="ir.ui.view" id="view_mail_mass_mailing_contact_search">
  99. <field name="name">mail.mass_mailing.contact.search</field>
  100. <field name="model">mail.mass_mailing.contact</field>
  101. <field name="arch" type="xml">
  102. <search string="Mailing Lists Subscribers">
  103. <field name="name"/>
  104. <field name="email"/>
  105. <field name="list_id"/>
  106. <separator/>
  107. <filter string="Exclude Opt Out" name="not_opt_out" domain="[('opt_out', '=', False)]"/>
  108. <group expand="0" string="Group By">
  109. <filter string="Creation Date" name="group_create_date"
  110. context="{'group_by': 'create_date'}"/>
  111. <filter string="Mailing Lists" name="group_list_id"
  112. context="{'group_by': 'list_id'}"/>
  113. </group>
  114. </search>
  115. </field>
  116. </record>
  117. <record model="ir.ui.view" id="view_mail_mass_mailing_contact_tree">
  118. <field name="name">mail.mass_mailing.contact.tree</field>
  119. <field name="model">mail.mass_mailing.contact</field>
  120. <field name="priority">10</field>
  121. <field name="arch" type="xml">
  122. <tree string="Mailing Lists Subscribers" editable="top">
  123. <field name="email"/>
  124. <field name="name"/>
  125. <field name="list_id"/>
  126. <field name="opt_out"/>
  127. </tree>
  128. </field>
  129. </record>
  130. <record model="ir.actions.act_window" id="action_view_mass_mailing_contacts">
  131. <field name="name">Mailing List Subscribers</field>
  132. <field name="res_model">mail.mass_mailing.contact</field>
  133. <field name="view_type">form</field>
  134. <field name="view_mode">tree</field>
  135. <field name="context">{'search_default_not_opt_out': 1}</field>
  136. </record>
  137. <record model="ir.actions.act_window" id="action_view_mass_mailing_contacts_from_list">
  138. <field name="name">Recipients</field>
  139. <field name="res_model">mail.mass_mailing.contact</field>
  140. <field name="view_type">form</field>
  141. <field name="view_mode">tree</field>
  142. <field name="context">{'search_default_list_id': active_id, 'search_default_not_opt_out': 1}</field>
  143. <field name="help" type="html">
  144. <p class="oe_view_nocontent_create">
  145. Click to create a recipient.
  146. </p>
  147. </field>
  148. </record>
  149. <menuitem name="Contacts" id="menu_email_mass_mailing_contacts"
  150. parent="mass_mailing_list" sequence="50"
  151. action="action_view_mass_mailing_contacts"/>
  152. <!-- MASS MAILING LIST -->
  153. <record model="ir.ui.view" id="view_mail_mass_mailing_list_search">
  154. <field name="name">mail.mass_mailing.list.search</field>
  155. <field name="model">mail.mass_mailing.list</field>
  156. <field name="arch" type="xml">
  157. <search string="Mailing Lists">
  158. <field name="name"/>
  159. </search>
  160. </field>
  161. </record>
  162. <record model="ir.ui.view" id="view_mail_mass_mailing_list_tree">
  163. <field name="name">mail.mass_mailing.list.tree</field>
  164. <field name="model">mail.mass_mailing.list</field>
  165. <field name="priority">10</field>
  166. <field name="arch" type="xml">
  167. <tree string="Mailing Lists">
  168. <field name="name"/>
  169. <field name="contact_nbr"/>
  170. </tree>
  171. </field>
  172. </record>
  173. <record model="ir.ui.view" id="view_mail_mass_mailing_list_form">
  174. <field name="name">mail.mass_mailing.list.form</field>
  175. <field name="model">mail.mass_mailing.list</field>
  176. <field name="arch" type="xml">
  177. <form string="Contact List">
  178. <sheet>
  179. <div class="oe_right oe_button_box" name="buttons">
  180. <button name="%(mass_mailing.action_view_mass_mailing_contacts_from_list)d"
  181. type="action" icon="fa-user" class="oe_stat_button pull-right">
  182. <field name="contact_nbr" string="Recipients" widget="statinfo"/>
  183. </button>
  184. </div>
  185. <div class="oe_title">
  186. <label for="name" class="oe_edit_only"/>
  187. <h1>
  188. <field name="name"/>
  189. </h1>
  190. </div>
  191. </sheet>
  192. </form>
  193. </field>
  194. </record>
  195. <record model="ir.actions.act_window" id="action_view_mass_mailing_lists">
  196. <field name="name">Mailing Lists</field>
  197. <field name="res_model">mail.mass_mailing.list</field>
  198. <field name="view_type">form</field>
  199. <field name="view_mode">tree,form</field>
  200. <field name="help" type="html">
  201. <p class="oe_view_nocontent_create">
  202. Click here to create a new mailing list.
  203. </p><p>
  204. Mailing lists allows you to to manage customers and
  205. contacts easily and to send to mailings in a single click.
  206. </p></field>
  207. </record>
  208. <menuitem name="Mailing Lists" id="menu_email_mass_mailing_lists"
  209. parent="mass_mailing_list" sequence="40"
  210. action="action_view_mass_mailing_lists"/>
  211. <!-- MASS MAILING !-->
  212. <record model="ir.ui.view" id="view_mail_mass_mailing_search">
  213. <field name="name">mail.mass_mailing.search</field>
  214. <field name="model">mail.mass_mailing</field>
  215. <field name="arch" type="xml">
  216. <search string="Mass Mailings">
  217. <field name="name" string="Mailings"/>
  218. <field name="mass_mailing_campaign_id"/>
  219. <group expand="0" string="Group By">
  220. <filter string="Campaign" name="group_mass_mailing_campaign_id"
  221. groups="mass_mailing.group_mass_mailing_campaign"
  222. context="{'group_by': 'mass_mailing_campaign_id'}"/>
  223. <filter string="State" name="group_state"
  224. context="{'group_by': 'state'}"/>
  225. <filter string="Sent By" domain="[]"
  226. context="{'group_by':'email_from'}"/>
  227. <separator/>
  228. <filter string="Sent Month"
  229. domain="[]" context="{'group_by':'sent_date:month'}"/>
  230. </group>
  231. </search>
  232. </field>
  233. </record>
  234. <record model="ir.ui.view" id="view_mail_mass_mailing_tree">
  235. <field name="name">mail.mass_mailing.tree</field>
  236. <field name="model">mail.mass_mailing</field>
  237. <field name="priority">10</field>
  238. <field name="arch" type="xml">
  239. <tree string="Mass Mailings">
  240. <field name="name"/>
  241. <field name="sent"/>
  242. <field name="delivered"/>
  243. <field name="opened"/>
  244. <field name="replied"/>
  245. <field name="mass_mailing_campaign_id"
  246. groups="mass_mailing.group_mass_mailing_campaign"/>
  247. </tree>
  248. </field>
  249. </record>
  250. <record model="ir.ui.view" id="view_mail_mass_mailing_form">
  251. <field name="name">mail.mass_mailing.form</field>
  252. <field name="model">mail.mass_mailing</field>
  253. <field name="arch" type="xml">
  254. <form string="Mass Mailing">
  255. <header>
  256. <button name="action_test_mailing" type="object"
  257. class="oe_highlight" string="Test Mailing"
  258. attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('body_html', '=', False)]}"/>
  259. <button name="action_test_mailing" type="object"
  260. attrs="{'invisible': ['&amp;', ('state', '=', 'draft'), ('body_html', '!=', False)]}"
  261. string="Test Mailing"/>
  262. <button name="send_mail" type="object"
  263. attrs="{'invisible': ['|', ('state', '=', 'done'), ('body_html', '=', False)]}"
  264. class="oe_highlight" string="Send to All" confirm="This will send the email to all recipients. Do you still want to proceed ?"/>
  265. <button name="send_mail" type="object"
  266. attrs="{'invisible': ['&amp;', ('state', '!=', 'done'), ('body_html', '!=', False)]}"
  267. string="Send to All" confirm="This will send the email to all recipients. Do you still want to proceed ?"/>
  268. <field name="state" widget="statusbar"/>
  269. </header>
  270. <div class="oe_form_box_info oe_text_center" attrs="{'invisible': [('scheduled', '=', 0)]}">
  271. <p><strong>
  272. <field name="scheduled" class="oe_inline"/>
  273. emails are in queue and will be sent soon.
  274. </strong></p>
  275. </div>
  276. <sheet>
  277. <div class="oe_button_box pull-right" attrs="{'invisible': [('state', 'in', ('draft','test'))]}">
  278. <button name="%(action_view_mail_mail_statistics_mailing)d"
  279. context="{'search_default_filter_received': True}"
  280. type="action" class="oe_stat_button">
  281. <field name="received_ratio" string="Received" widget="percentpie"/>
  282. </button>
  283. <button name="%(action_view_mail_mail_statistics_mailing)d"
  284. context="{'search_default_filter_opened': True}"
  285. type="action" class="oe_stat_button">
  286. <field name="opened_ratio" string="Opened" widget="percentpie"/>
  287. </button>
  288. <button name="%(action_view_mail_mail_statistics_mailing)d"
  289. context="{'search_default_filter_replied': True}"
  290. type="action" class="oe_stat_button">
  291. <field name="replied_ratio" string="Replied" widget="percentpie"/>
  292. </button>
  293. <button name="%(action_view_mail_mail_statistics_mailing)d"
  294. context="{'search_default_filter_opened': True, 'search_default_group_open_date': True}"
  295. type="action" class="oe_stat_button oe_inline">
  296. <field name="opened_daily" string="Opened Daily" widget="barchart"/>
  297. </button>
  298. <button name="%(action_view_mail_mail_statistics_mailing)d"
  299. context="{'search_default_filter_replied': True, 'search_default_group_reply_date': True}"
  300. type="action" class="oe_stat_button oe_inline">
  301. <field name="replied_daily" string="Replied Daily" widget="barchart"/>
  302. </button>
  303. </div>
  304. <button name="%(action_view_mail_mail_statistics_mailing)d" type="action"
  305. icon="fa-envelope-o" class="oe_stat_button"
  306. attrs="{'invisible': [('total', '=', 0)]}" >
  307. <field name="total" string="Emails" widget="statinfo"/>
  308. </button>
  309. <group>
  310. <field name="email_from"/>
  311. <field name="name"/>
  312. <label for="mailing_model" string="Recipients"/>
  313. <div>
  314. <field name="mailing_model" widget="radio" style="margin-bottom: 8px"
  315. on_change="on_change_model_and_list(mailing_model, contact_list_ids)"/>
  316. <field name="mailing_domain" widget="char_domain"
  317. placeholder="Select recipients"
  318. context="{'search_default_not_opt_out': 1}"
  319. options="{'model_field': 'mailing_model'}"/>
  320. <div attrs="{'invisible': [('mailing_model', '&lt;&gt;', 'mail.mass_mailing.contact')]}">
  321. <label for="contact_list_ids" string="Select mailing lists:" class="oe_edit_only"/>
  322. <field name="contact_list_ids" widget="many2many_tags"
  323. placeholder="Select mailing lists..." class="oe_inline"
  324. on_change="on_change_model_and_list(mailing_model, contact_list_ids)"/>
  325. </div>
  326. </div>
  327. </group>
  328. <notebook>
  329. <page string="Mail Body">
  330. <button name="action_edit_html" type="object" string="Design Email" class="oe_highlight"
  331. attrs="{'invisible': [('body_html', '!=', False)]}"/>
  332. <button name="action_edit_html" type="object" string="Change Email Design"
  333. attrs="{'invisible': [('body_html', '=', False)]}"/>
  334. <div attrs="{'invisible' : ['|', ('state', '=', 'done'), ('body_html','!=',False)]}" class="oe_view_nocontent oe_clear">
  335. <p class="oe_view_nocontent_create oe_edit_only">
  336. Click to design your email.
  337. </p>
  338. </div>
  339. <field name="body_html" readonly="1"/>
  340. <field name="attachment_ids" widget="many2many_binary" string="Attach a file"/>
  341. </page>
  342. <page string="Options">
  343. <group>
  344. <group string="Mailing">
  345. <label for="reply_to"/>
  346. <div>
  347. <p class="alert alert-danger"
  348. attrs="{'invisible': ['|', ('reply_to_mode', '!=', 'thread'), ('mailing_model', 'not in', ['mail.mass_mailing.contact', 'res.partner'])]}">
  349. This option is not available for the recipients you selected.
  350. Please use a specific reply-to email address.
  351. </p>
  352. <field name="reply_to_mode" widget="radio"/>
  353. <field name="reply_to" style="margin-left: 16px;"
  354. attrs="{'required': [('reply_to_mode', '=', 'email')]}"/>
  355. </div>
  356. <field name="create_date" readonly="1"/>
  357. <field name="sent_date" readonly="1"/>
  358. </group>
  359. <group string="Campaign">
  360. <field name="mass_mailing_campaign_id" groups="mass_mailing.group_mass_mailing_campaign"/>
  361. <label for="contact_ab_pc"/>
  362. <div>
  363. <field name="contact_ab_pc" class="oe_inline"/> %
  364. </div>
  365. </group>
  366. </group>
  367. </page>
  368. </notebook>
  369. </sheet>
  370. </form>
  371. </field>
  372. </record>
  373. <record model="ir.ui.view" id="view_mail_mass_mailing_kanban">
  374. <field name="name">mail.mass_mailing.kanban</field>
  375. <field name="model">mail.mass_mailing</field>
  376. <field name="arch" type="xml">
  377. <kanban default_group_by='state'>
  378. <field name='color'/>
  379. <field name='total'/>
  380. <templates>
  381. <t t-name="kanban-box">
  382. <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click oe_kanban_mass_mailing">
  383. <div class="oe_dropdown_toggle oe_dropdown_kanban">
  384. <span class="oe_e">i</span>
  385. <ul class="oe_dropdown_menu">
  386. <t t-if="widget.view.is_action_enabled('delete')">
  387. <li><a type="delete">Delete</a></li>
  388. </t>
  389. </ul>
  390. </div>
  391. <div class="oe_kanban_content">
  392. <div>
  393. <h3><field name="name"/></h3>
  394. <h4 style="display: inline;"><field name="mass_mailing_campaign_id" groups="mass_mailing.group_mass_mailing_campaign"/></h4>
  395. <t t-if="record.mass_mailing_campaign_id.raw_value" groups="mass_mailing.group_mass_mailing_campaign"> - </t><field name="sent_date"/>
  396. </div>
  397. <div>
  398. <div style="display: inline-block">
  399. <field name="delivered" widget="gauge" style="width:120px; height: 90px;"
  400. options="{'max_field': 'total'}"/>
  401. </div>
  402. <div style="display: inline-block; vertical-align: top;">
  403. <strong>Opened</strong> <field name="opened_ratio"/> %<br />
  404. <strong>Replied</strong> <field name="replied_ratio"/> %
  405. </div>
  406. </div>
  407. </div>
  408. <div class="oe_clear"></div>
  409. </div>
  410. </t>
  411. </templates>
  412. </kanban>
  413. </field>
  414. </record>
  415. <record id="view_mail_mass_mailing_graph" model="ir.ui.view">
  416. <field name="name">mail.mass_mailing.graph</field>
  417. <field name="model">mail.mass_mailing</field>
  418. <field name="arch" type="xml">
  419. <graph string="Mass Mailing" type="bar" stacked="True">
  420. <field name="mass_mailing_campaign_id" type="row"/>
  421. <field name="sent_date" interval="month" type="col"/>
  422. </graph>
  423. </field>
  424. </record>
  425. <record id="action_view_mass_mailings" model="ir.actions.act_window">
  426. <field name="name">Mass Mailings</field>
  427. <field name="res_model">mail.mass_mailing</field>
  428. <field name="view_type">form</field>
  429. <field name="view_mode">kanban,tree,form</field>
  430. <field name="help" type="html">
  431. <p class="oe_view_nocontent_create">
  432. Click here to create a new mailing.
  433. </p><p>
  434. Mass mailing allows you to to easily design and send mass mailings to your contacts, customers or leads using mailing lists.
  435. </p></field>
  436. </record>
  437. <record id="action_view_mass_mailings_from_campaign" model="ir.actions.act_window">
  438. <field name="name">Mass Mailings</field>
  439. <field name="res_model">mail.mass_mailing</field>
  440. <field name="view_type">form</field>
  441. <field name="view_mode">kanban,tree,form</field>
  442. <field name="context">{
  443. 'search_default_mass_mailing_campaign_id': [active_id],
  444. 'default_mass_mailing_campaign_id': active_id,
  445. }
  446. </field>
  447. <field name="help" type="html">
  448. <p class="oe_view_nocontent_create">
  449. Click here to create a new mailing.
  450. </p><p>
  451. Mass mailing allows you to to easily design and send mass mailings to your contacts, customers or leads using mailing lists.
  452. </p></field>
  453. </record>
  454. <menuitem name="Mass Mailings" id="menu_email_mass_mailings"
  455. parent="mass_mailing_campaign" sequence="2"
  456. action="action_view_mass_mailings"/>
  457. <!-- MASS MAILING CAMPAIGN STAGE !-->
  458. <record model="ir.ui.view" id="view_mail_mass_mailing_stage_search">
  459. <field name="name">mail.mass_mailing.stage.search</field>
  460. <field name="model">mail.mass_mailing.stage</field>
  461. <field name="arch" type="xml">
  462. <search string="Mass Mailings">
  463. <field name="name"/>
  464. </search>
  465. </field>
  466. </record>
  467. <record model="ir.ui.view" id="view_mail_mass_mailing_stage_tree">
  468. <field name="name">mail.mass_mailing.stage.tree</field>
  469. <field name="model">mail.mass_mailing.stage</field>
  470. <field name="priority">10</field>
  471. <field name="arch" type="xml">
  472. <tree string="Mass Mailings" editable="top">
  473. <field name="sequence" widget="handle"/>
  474. <field name="name"/>
  475. </tree>
  476. </field>
  477. </record>
  478. <record id="action_view_mass_mailing_stages" model="ir.actions.act_window">
  479. <field name="name">Mass Mailing Stages</field>
  480. <field name="res_model">mail.mass_mailing.stage</field>
  481. <field name="view_type">form</field>
  482. <field name="view_mode">tree,form</field>
  483. </record>
  484. <menuitem name="Campaign Stages" id="menu_view_mass_mailing_stages"
  485. parent="marketing_configuration" sequence="1"
  486. groups="mass_mailing.group_mass_mailing_campaign"
  487. action="action_view_mass_mailing_stages"/>
  488. <!-- MASS MAILING CAMPAIGNS !-->
  489. <record model="ir.ui.view" id="view_mail_mass_mailing_campaign_search">
  490. <field name="name">mail.mass_mailing.campaign.search</field>
  491. <field name="model">mail.mass_mailing.campaign</field>
  492. <field name="arch" type="xml">
  493. <search string="Mass Mailing Campaigns">
  494. <field name="name" string="Campaigns"/>
  495. <field name="category_ids"/>
  496. <field name="user_id"/>
  497. <group expand="0" string="Group By">
  498. <filter string="Stage" name="group_stage_id"
  499. context="{'group_by': 'stage_id'}"/>
  500. <filter string="Responsible" name="group_user_id"
  501. context="{'group_by': 'user_id'}"/>
  502. </group>
  503. </search>
  504. </field>
  505. </record>
  506. <record model="ir.ui.view" id="view_mail_mass_mailing_campaign_tree">
  507. <field name="name">mail.mass_mailing.campaign.tree</field>
  508. <field name="model">mail.mass_mailing.campaign</field>
  509. <field name="priority">10</field>
  510. <field name="arch" type="xml">
  511. <tree string="Mass Mailing Campaigns">
  512. <field name="name"/>
  513. <field name="user_id"/>
  514. <field name="stage_id"/>
  515. <field name="category_ids"/>
  516. </tree>
  517. </field>
  518. </record>
  519. <record model="ir.ui.view" id="view_mail_mass_mailing_campaign_form">
  520. <field name="name">mail.mass_mailing.campaign.form</field>
  521. <field name="model">mail.mass_mailing.campaign</field>
  522. <field name="arch" type="xml">
  523. <form string="Mass Mailing Campaign">
  524. <header>
  525. <field name="stage_id" widget="statusbar" clickable="True"/>
  526. </header>
  527. <sheet>
  528. <group>
  529. <group>
  530. <field name="name"/>
  531. <field name="user_id"/>
  532. <field name="category_ids" widget="many2many_tags"/>
  533. </group>
  534. <group>
  535. <field name="total" invisible="1"/>
  536. <div class="oe_right oe_button_box" name="buttons"
  537. attrs="{'invisible': [('total', '=', 0)]}">
  538. <button name="%(action_view_mass_mailing_contacts)d"
  539. type="action" class="oe_stat_button oe_inline">
  540. <field name="received_ratio" widget="percentpie" string="Received"/>
  541. </button>
  542. <button name="%(action_view_mass_mailing_contacts)d"
  543. type="action" class="oe_stat_button oe_inline">
  544. <field name="opened_ratio" widget="percentpie" string="Opened"/>
  545. </button>
  546. <button name="%(action_view_mass_mailing_contacts)d"
  547. type="action" class="oe_stat_button oe_inline">
  548. <field name="replied_ratio" widget="percentpie" string="Replied"/>
  549. </button>
  550. </div>
  551. </group>
  552. </group>
  553. <strong>Related Mailing(s)</strong>
  554. <field name="mass_mailing_ids" readonly="1" string="Related Mailing(s)">
  555. <tree>
  556. <field name="name"/>
  557. <field name="sent_date"/>
  558. <field name="state"/>
  559. <field name="delivered"/>
  560. <field name="opened"/>
  561. <field name="replied"/>
  562. <field name="bounced"/>
  563. <button name="action_duplicate" type="object" string="Duplicate"/>
  564. </tree>
  565. </field>
  566. </sheet>
  567. </form>
  568. </field>
  569. </record>
  570. <record model="ir.ui.view" id="view_mail_mass_mailing_campaign_kanban">
  571. <field name="name">mail.mass_mailing.campaign.kanban</field>
  572. <field name="model">mail.mass_mailing.campaign</field>
  573. <field name="arch" type="xml">
  574. <kanban default_group_by='stage_id'>
  575. <field name='total'/>
  576. <field name='color'/>
  577. <field name='user_id'/>
  578. <field name='mass_mailing_ids'/>
  579. <templates>
  580. <t t-name="kanban-box">
  581. <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click oe_kanban_mass_mailing_campaign">
  582. <div class="oe_dropdown_toggle oe_dropdown_kanban">
  583. <span class="oe_e">i</span>
  584. <ul class="oe_dropdown_menu">
  585. <t t-if="widget.view.is_action_enabled('edit')">
  586. <li><a type="edit">Settings</a></li>
  587. </t>
  588. <t t-if="widget.view.is_action_enabled('delete')">
  589. <li><a type="delete">Delete</a></li>
  590. </t>
  591. <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
  592. </ul>
  593. </div>
  594. <div class="oe_kanban_content">
  595. <div>
  596. <img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)"
  597. t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar oe_kanban_header_right"/>
  598. <h3 style="margin-bottom: 8px;"><field name="name"/></h3>
  599. <field name="category_ids"/>
  600. <a name="%(action_view_mass_mailings_from_campaign)d" type="action"
  601. class="oe_mailings">
  602. <h4 style="margin-top: 8px;"><t t-raw="record.mass_mailing_ids.raw_value.length"/> Mailings</h4>
  603. </a>
  604. </div>
  605. <div class="oe_clear"></div>
  606. <div>
  607. <div style="display: inline-block">
  608. <field name="delivered" widget="gauge" style="width:120px; height: 90px;"
  609. options="{'max_field': 'total'}"/>
  610. </div>
  611. <div style="display: inline-block; vertical-align: top;">
  612. <strong>Opened</strong> <field name="opened_ratio"/> %<br />
  613. <strong>Replied</strong> <field name="replied_ratio"/> %
  614. </div>
  615. </div>
  616. </div>
  617. <div class="oe_clear"></div>
  618. </div>
  619. </t>
  620. </templates>
  621. </kanban>
  622. </field>
  623. </record>
  624. <record id="action_view_mass_mailing_campaigns" model="ir.actions.act_window">
  625. <field name="name">Mass Mailing Campaigns</field>
  626. <field name="res_model">mail.mass_mailing.campaign</field>
  627. <field name="view_type">form</field>
  628. <field name="view_mode">kanban,tree,form</field>
  629. <field name="help" type="html">
  630. <p class="oe_view_nocontent_create">
  631. Click to define a new mass mailing campaign.
  632. </p><p>
  633. Create a campaign to structure mass mailing and get analysis from email status.
  634. </p>
  635. </field>
  636. </record>
  637. <menuitem name="Campaigns" id="menu_email_campaigns"
  638. parent="mass_mailing_campaign" sequence="1"
  639. action="action_view_mass_mailing_campaigns"
  640. groups="mass_mailing.group_mass_mailing_campaign"/>
  641. </data>
  642. </openerp>