hunk.code_window:                                                 <div class="col-xs-4 text-right">
                                                       <field name="clicks_ratio"/> %
                                                   </div>
                                               </div>
                                               <div class='o_kanban_primary_bottom'>
                                                   <field name="delivered" widget="progressbar" title="Delivered" options="{'current_value': 'delivered', 'max_value': 'total', 'editable': false}"/>
                                               </div>
                                           </t>
                                       </div>
  
hunk.labels: keep keep keep keep keep replace keep keep keep
hunk.after_edit:                                                 <field name="delivered" widget="progressbar" title="Delivered" options="{'current_value': 'delivered', 'max_value': 'expected', 'editable': false}"/>
  
hunk.file_path: addons/mass_mailing/views/mass_mailing_views.xml
hunk.type: replace
file: <?xml version="1.0" encoding="utf-8"?>
  <odoo>
  
          <!-- Marketing / Mailing -->
          <menuitem name="Email Marketing" id="mass_mailing_menu_root" sequence="60" web_icon="mass_mailing,static/description/icon.png"/>
          <menuitem name="Mailings" id="mass_mailing_menu"
              parent="mass_mailing_menu_root" sequence="1" groups="mass_mailing.group_mass_mailing_user"/>
          <menuitem name="Mailing Lists" id="mass_mailing_mailing_list_menu"
              parent="mass_mailing_menu_root" sequence="2" groups="mass_mailing.group_mass_mailing_user"/>
          <!-- Marketing / Configuration -->
          <menuitem name="Configuration" id="mass_mailing_configuration"
              parent="mass_mailing_menu_root" sequence="100"/>
  
          <!--  MAILING CONTACT -->
  
          <!-- Custom reports (aka filters) -->
          <record id="filter_contact_subscription" model="ir.filters">
              <field name="name">List Subscription</field>
              <field name="model_id">mail.mass_mailing.contact</field>
              <field name="user_id" eval="False"/>
              <field name="context">{'group_by': ['create_date:month']}</field>
          </record>
          <record id="filter_contact_unsubscription" model="ir.filters">
              <field name="name">List Unsubscription</field>
              <field name="model_id">mail.mass_mailing.contact</field>
              <field name="user_id" eval="False"/>
              <field name="domain">[('opt_out','=',True)]</field>
              <field name="context">{'group_by': ['unsubscription_date:month']}</field>
          </record>
  
          <record model="ir.ui.view" id="view_mail_mass_mailing_contact_search">
              <field name="name">mail.mass_mailing.contact.search</field>
              <field name="model">mail.mass_mailing.contact</field>
              <field name="arch" type="xml">
                 <search string="Mailing List Contacts">
                      <field name="name" filter_domain="['|','|',('name','ilike',self),('company_name','ilike',self), ('email','ilike',self)]"
                          string="Name / Email"/>
                      <field name="tag_ids"/>
                      <field name="list_ids"/>
                      <separator/>
                      <filter string="Exclude Opt Out" name="not_opt_out" domain="[('opt_out', '=', False)]"/>
                      <separator/>
                      <filter string="Exclude Bounced" name="not_bounced" domain="[('message_bounce', '&lt;', 3)]"/>
                      <group expand="0" string="Group By">
                          <filter string="Creation Date" name="group_create_date"
                              context="{'group_by': 'create_date'}"/>
                      </group>
                  </search>
              </field>
          </record>
  
          <record model="ir.ui.view" id="view_mail_mass_mailing_contact_tree">
              <field name="name">mail.mass_mailing.contact.tree</field>
              <field name="model">mail.mass_mailing.contact</field>
              <field name="priority">10</field>
              <field name="arch" type="xml">
                  <tree string="Mailing List Contacts">
                      <field name="create_date"/>
                      <field name="name"/>
                      <field name="company_name"/>
                      <field name="email"/>
                      <field name="message_bounce"/>
                      <field name="opt_out"/>
                  </tree>
              </field>
          </record>
  
          <record id="view_mail_mass_mailing_contact_kanban" model="ir.ui.view">
              <field name="name">mail.mass_mailing.contact.kanban</field>
              <field name="model">mail.mass_mailing.contact</field>
              <field name="arch" type="xml">
                  <kanban>
                      <field name="name"/>
                      <field name="company_name"/>
                      <field name="email"/>
                      <field name="message_bounce"/>
                      <templates>
                          <t t-name="kanban-box">
                              <div t-attf-class="oe_kanban_global_click">
                                  <div class="o_kanban_record_top">
                                      <div class="o_kanban_record_headings">
                                          <strong class="o_kanban_record_title">
                                              <t t-esc="record.name.value"/>
                                          </strong>
                                      </div>
                                      <span class="badge" title="Number of bounced email.">
                                          <i class="fa fa-exclamation-triangle"/> <t t-esc="record.message_bounce.value" title=""/>
                                      </span>
                                  </div>
                                  <div class="o_kanban_record_body">
                                      <field name="tag_ids"/>
                                  </div>
                                  <div class="o_kanban_record_bottom">
                                      <div class="oe_kanban_bottom_left">
                                          <strong>
                                              <t t-esc="record.email.value"/>
                                          </strong>
                                      </div>
                                      <div class="oe_kanban_bottom_right">
                                          <t t-esc="record.company_name.value"/>
                                      </div>
                                  </div>
                              </div>
                          </t>
                      </templates>
                  </kanban>
              </field>
          </record>
  
          <record model="ir.ui.view" id="view_mail_mass_mailing_contact_form">
              <field name="name">mail.mass_mailing.contact.form</field>
              <field name="model">mail.mass_mailing.contact</field>
              <field name="priority">10</field>
              <field name="arch" type="xml">
                  <form string="Mailing List Contacts">
                      <sheet>
                          <div class="oe_title">
                              <label for="name" class="oe_edit_only"/>
                              <h1>
                                  <field name="name" placeholder="e.g. John Smith"/>
                              </h1>
                              <label for="tag_ids" class="oe_edit_only"/>
                              <div>
                                  <field name="tag_ids" widget="many2many_tags" style="width: 100%%"/>
                              </div>
                          </div>
                          <group>
                              <group>
                                  <field name="email"/>
                                  <field name="title_id"/>
                                  <field name="company_name"/>
                                  <field name="country_id"/>
                              </group>
                              <group>
                                  <field name="create_date" readonly="1"/>
                                  <field name="unsubscription_date"/>
                                  <label for="message_bounce"/>
                                  <div class="o_row">
                                      <field name="message_bounce"/>
                                      <span> times</span>
                                  </div>
                                  <field name="opt_out"/>
                              </group>
                          </group>
                          <field name="list_ids"/>
                      </sheet>
                  </form>
              </field>
          </record>
  
          <record model="ir.ui.view" id="view_mail_mass_mailing_contact_pivot">
              <field name="name">mail.mass_mailing.contact.pivot</field>
              <field name="model">mail.mass_mailing.contact</field>
              <field name="priority">10</field>
              <field name="arch" type="xml">
                  <pivot string="Mailing List Contacts" stacked="True">
                      <field name="create_date" type="row"/>
                  </pivot>
              </field>
          </record>
  
          <record model="ir.ui.view" id="view_mail_mass_mailing_contact_graph">
              <field name="name">mail.mass_mailing.contact.graph</field>
              <field name="model">mail.mass_mailing.contact</field>
              <field name="priority">10</field>
              <field name="arch" type="xml">
                  <graph string="Mailing List Contacts" stacked="True">
                      <field name="create_date" type="row"/>
                  </graph>
              </field>
          </record>
  
          <record model="ir.actions.act_window" id="action_view_mass_mailing_contacts">
              <field name="name">Mailing List Contacts</field>
              <field name="res_model">mail.mass_mailing.contact</field>
              <field name="view_type">form</field>
              <field name="view_mode">tree,kanban,form,graph,pivot</field>
              <field name="context">{'search_default_not_opt_out': 1}</field>
              <field name="help" type="html">
                <p class="o_view_nocontent_smiling_face">
                  Create a contact in your address book
                </p><p>
                  Odoo helps you to easily track all activities related to a customer.
                </p>
              </field>
          </record>
  
          <record model="ir.actions.act_window" id="action_view_mass_mailing_contacts_from_list">
              <field name="name">Recipients</field>
              <field name="res_model">mail.mass_mailing.contact</field>
              <field name="view_type">form</field>
              <field name="view_mode">tree,form,graph</field>
              <field name="domain">[('list_ids', 'in', [active_id])]</field>
              <field name="context">{'search_default_not_opt_out': 1, 'default_list_ids': [(4,active_id)]}</field>
              <field name="help" type="html">
                <p class="o_view_nocontent_smiling_face">
                  Create a new recipient
                </p>
              </field>
          </record>
  
          <menuitem name="Mailing List Contacts" id="menu_email_mass_mailing_contacts"
              parent="mass_mailing_mailing_list_menu" sequence="4"
              action="action_view_mass_mailing_contacts"/>
  
          <!--  MAILING LIST -->
          <record model="ir.ui.view" id="view_mail_mass_mailing_list_search">
              <field name="name">mail.mass_mailing.list.search</field>
              <field name="model">mail.mass_mailing.list</field>
              <field name="arch" type="xml">
                  <search string="Mailing Lists">
                      <field name="name"/>
                      <field name="create_date"/>
                      <filter name="inactive" string="Archived" domain="[('active','=',False)]"/>
                      <group expand="0" string="Group By">
                          <filter string="Creation Month" name="group_create_date"
                              context="{'group_by': 'create_date'}"/>
                      </group>
                  </search>
              </field>
          </record>
  
          <record model="ir.ui.view" id="view_mail_mass_mailing_list_tree">
              <field name="name">mail.mass_mailing.list.tree</field>
              <field name="model">mail.mass_mailing.list</field>
              <field name="priority">10</field>
              <field name="arch" type="xml">
                  <tree string="Mailing Lists">
                      <field name="name"/>
                      <field name="create_date"/>
                      <field name="contact_nbr"/>
                  </tree>
              </field>
          </record>
  
          <record model="ir.ui.view" id="view_mail_mass_mailing_list_form">
              <field name="name">mail.mass_mailing.list.form</field>
              <field name="model">mail.mass_mailing.list</field>
              <field name="arch" type="xml">
                  <form string="Contact List">
                      <sheet>
                          <div class="oe_button_box" name="button_box">
                              <button name="%(mass_mailing.action_view_mass_mailing_contacts_from_list)d"
                                      type="action" icon="fa-user" class="oe_stat_button">
                                  <field name="contact_nbr" string="Recipients" widget="statinfo"/>
                              </button>
                              <button name="toggle_active" type="object"
                                      class="oe_stat_button" icon="fa-archive">
                                  <field name="active" widget="boolean_button"
                                      options='{"terminology": "archive"}'/>
                              </button>
                          </div>
                          <div class="oe_title">
                              <label for="name" class="oe_edit_only"/>
                              <h1>
                                  <field name="name" placeholder="e.g. Consumer Newsletter"/>
                              </h1>
                          </div>
                      </sheet>
                  </form>
              </field>
          </record>
  
          <record id="view_mail_mass_mailing_list_form_simplified" model="ir.ui.view">
              <field name="name">mail.mass_mailing.list.form.simplified</field>
              <field name="model">mail.mass_mailing.list</field>
              <field name="arch" type="xml">
                  <form string="Contact List">
                      <group>
                          <group>
                              <div class="oe_title">
                                  <label for="name" class="oe_edit_only"/>
                                  <h1>
                                      <field name="name" placeholder="e.g. Consumer Newsletter"/>
                                  </h1>
                              </div>
                          </group>
                      </group>
                      <footer>
                          <button string="Create" name="close_dialog" type="object" class="btn-primary"/>
                          <button string="Discard" class="btn-default" special="cancel"/>
                      </footer>
                  </form>
              </field>
          </record>
  
          <record id="open_create_mass_mailing_list" model="ir.actions.act_window">
              <field name="name">Create a Mass Mailing List</field>
              <field name="res_model">mail.mass_mailing.list</field>
              <field name="view_type">form</field>
              <field name="view_mode">form</field>
              <field name="view_id" ref="view_mail_mass_mailing_list_form_simplified"/>
              <field name="target">new</field>
          </record>
  
          <record id="view_mail_mass_mailing_list_kanban" model="ir.ui.view">
              <field name="name">mail.mass_mailing.list.kanban</field>
              <field name="model">mail.mass_mailing.list</field>
              <field name="arch" type="xml">
                  <kanban class="o_kanban_mobile" on_create="mass_mailing.open_create_mass_mailing_list">
                      <field name="name"/>
                      <field name="contact_nbr"/>
                      <templates>
                          <t t-name="kanban-box">
                              <div t-attf-class="oe_kanban_global_click">
                                  <div class="o_mass_mailing_kanban_main">
                                      <div class="o_kanban_card_content">
                                          <div class="o_kanban_primary_left">
                                              <div class="o_primary">
                                                  <span><t t-esc="record.name.value"/></span>
                                              </div>
                                          </div>
                                      </div>
                                      <div class="o_kanban_card_manage_pane">
                                          <div class="o_kanban_card_manage_section o_dropdown_kanban dropdown">
                                              <a class="dropdown-toggle btn" data-toggle="dropdown" href="#" >
                                                  <span class="fa fa-ellipsis-v"/>
                                              </a>
                                              <ul class="dropdown-menu" role="menu">
                                                  <li t-if="widget.editable">
                                                      <a type="edit">Edit</a>
                                                  </li>
                                                  <li t-if="widget.deletable">
                                                      <a type="delete">Delete</a>
                                                  </li>
                                              </ul>
                                          </div>
                                      </div>
                                  </div>
                                  <div class="o_mailing_list_kanban_boxes">
                                      <a class="o_project_kanban_box" name="%(action_view_mass_mailing_contacts_from_list)d" type="action">
                                          <div>
                                              <span class="badge">
                                                  <i class="fa fa-user"/>
                                                  <t t-esc="record.contact_nbr.value"/>
                                              </span>
                                          </div>
                                      </a>
                                  </div>
                              </div>
                          </t>
                      </templates>
                  </kanban>
              </field>
          </record>
  
          <record model="ir.actions.act_window" id="action_view_mass_mailing_lists">
              <field name="name">Mailing Lists</field>
              <field name="res_model">mail.mass_mailing.list</field>
              <field name="view_type">form</field>
              <field name="view_mode">kanban,tree,form</field>
              <field name="help" type="html">
                <p class="o_view_nocontent_smiling_face">
                  Create a new mailing list
                </p><p>
                  No need of importing your mailing lists, you can easily
                  send emails to any contact saved in other Odoo apps.
                </p>
              </field>
          </record>
  
          <menuitem name="Mailing Lists" id="menu_email_mass_mailing_lists"
              parent="mass_mailing_mailing_list_menu" sequence="3"
              action="action_view_mass_mailing_lists"/>
  
          <!--  MAILING !-->
          <record model="ir.ui.view" id="view_mail_mass_mailing_search">
              <field name="name">mail.mass_mailing.search</field>
              <field name="model">mail.mass_mailing</field>
              <field name="arch" type="xml">
                 <search string="Mailings">
                      <field name="name" string="Mailings"/>
                      <field name="mass_mailing_campaign_id"/>
                      <filter string="My Mailings" name="assigned_to_me"
                              domain="[('user_id', '=', uid)]"
                              help="Mailings that are assigned to me"/>
                      <filter name="inactive" string="Archived" domain="[('active','=',False)]"/>
                      <group expand="0" string="Group By">
                          <filter string="Status" name="group_state"
                              context="{'group_by': 'state'}"/>
                          <filter string="Sent By" name="sent_by" domain="[]"
                              context="{'group_by':'email_from'}"/>
                          <separator/>
                          <filter string="Sent Month" name="sent_month"
                              domain="[]" context="{'group_by':'sent_date:month'}"/>
                      </group>
                  </search>
              </field>
          </record>
  
          <record model="ir.ui.view" id="view_mail_mass_mailing_tree">
              <field name="name">mail.mass_mailing.tree</field>
              <field name="model">mail.mass_mailing</field>
              <field name="priority">10</field>
              <field name="arch" type="xml">
                  <tree string="Mailings">
                      <field name="name"/>
                      <field name="sent"/>
                      <field name="delivered"/>
                      <field name="opened"/>
                      <field name="replied"/>
                      <field name="mass_mailing_campaign_id"
                          groups="mass_mailing.group_mass_mailing_campaign"/>
                  </tree>
              </field>
          </record>
  
          <record model="ir.ui.view" id="view_mail_mass_mailing_form">
              <field name="name">mail.mass_mailing.form</field>
              <field name="model">mail.mass_mailing</field>
              <field name="arch" type="xml">
                  <form string="Mailing">
                      <header style="min-height:31px;">
                          <button name="action_test_mailing" type="object" class="oe_highlight" string="Test Mailing"/>
                          <button name="put_in_queue" type="object" attrs="{'invisible': ['|', ('state', 'in', ('in_queue', 'done'))]}" class="oe_highlight" string="Send to All"
                              confirm="This will send the email to all recipients. Do you still want to proceed ?"/>
                          <button name="cancel_mass_mailing" type="object" attrs="{'invisible': [('state', '!=', 'in_queue')]}" class="oe_highlight" string="Cancel"/>
                          <button name="retry_failed_mail" type="object" attrs="{'invisible': ['|', ('state', '!=', 'done'), ('failed', '=', 0)]}" class="oe_highlight" string="Retry"/>
  
                          <field name="state" readonly="1" widget="statusbar"/>
                      </header>
                      <div class="oe_form_box_info oe_text_center" attrs="{'invisible': [('scheduled', '=', 0)]}">
                          <p>
                              <button class="btn-link"
                                      name="%(action_view_mail_mail_statistics_mailing_list)d"
                                      type="action"
                                      context="{'search_default_filter_scheduled': True}">
                                  <strong>
                                      <field name="scheduled" class="oe_inline"/>
                                      email(s) are in queue and will be sent soon.
                                  </strong>
                              </button>
                          </p>
                      </div>
                      <div class="oe_form_box_info oe_text_center alert-info" attrs="{'invisible': ['|', ('state', '!=', 'done'), ('failed', '=', 0)]}">
                          <p>
                              <button class="btn-link"
                                      name="%(action_view_mail_mail_statistics_mailing_list)d"
                                      type="action"
                                      context="{'search_default_filter_failed': True}">
                                  <strong>
                                      <field name="failed" class="oe_inline"/>
                                      email(s) could not be sent.
                                  </strong>
                              </button>
                          </p>
                      </div>
                      <div class="oe_form_box_info oe_text_center" attrs="{'invisible': [('state', '!=', 'in_queue')]}">
                          <p><strong>
                              This mailing is scheduled for
                              <field name="next_departure" class="oe_inline"/>.
                          </strong></p>
                      </div>
                      <sheet>
                          <div class="oe_button_box" name="button_box" attrs="{'invisible': [('state', 'in', ('draft','test'))]}">
                              <button name="%(action_view_mail_mail_statistics_mailing_list)d" type="action"
                                  context="{'search_default_filter_sent': True}"
                                  icon="fa-envelope-o" class="oe_stat_button"
                                  attrs="{'invisible': [('sent', '=', 0)]}" >
                                  <field name="sent" string="Emails Sent" widget="statinfo"/>
                              </button>
                              <button name="%(action_view_mail_mail_statistics_mailing_list)d"
                                      context="{'search_default_filter_received': True}"
                                      type="action" class="oe_stat_button">
                                  <field name="received_ratio" string="Received" widget="percentpie"/>
                              </button>
                              <button name="%(action_view_mail_mail_statistics_mailing_list)d"
                                      context="{'search_default_filter_opened': True}"
                                      type="action" class="oe_stat_button">
                                  <field name="opened_ratio" string="Opened" widget="percentpie"/>
                              </button>
                              <button name="%(action_view_mail_mail_statistics_mailing_list)d"
                                      context="{'search_default_filter_replied': True}"
                                      type="action" class="oe_stat_button">
                                  <field name="replied_ratio" string="Replied" widget="percentpie"/>
                              </button>
                              <button name="%(action_view_mass_mailing_links_statistics)d"
                                  type="action" class="oe_stat_button">
                                  <field name="clicks_ratio" string="Clicks" widget="percentpie"/>
                              </button>
                              <button name="%(action_view_mail_mail_statistics_mailing_list)d"
                                  context="{'search_default_filter_bounced': True}"
                                  type="action" class="oe_stat_button">
                                  <field name="bounced_ratio" string="Bounced" widget="percentpie"/>
                              </button>
                              <button name="toggle_active" type="object"
                                      class="oe_stat_button" icon="fa-archive">
                                  <field name="active" widget="boolean_button"
                                      options='{"terminology": "archive"}'/>
                              </button>
                          </div>
  
                          <group>
                              <label for="name" string="Subject"/>
                              <div>
                                  <field name="name" nolabel="1"/>
                              </div>
                              <label for="mailing_model_id" string="Recipients"/>
                              <div>
                                  <field name="mailing_model_id" widget="selection"/>
                                  <field name="mailing_model_name" invisible="1"/>
                                  <field name="mailing_model_real" invisible="1"/>
                                  <field name="mailing_domain" widget="domain"
                                      attrs="{'invisible': [('mailing_model_name', '=', 'mail.mass_mailing.list')]}"
                                      options="{'model': 'mailing_model_real'}"
                                      context="{'search_default_not_opt_out':1}">
                                  </field>
                                  <div attrs="{'invisible': [('mailing_model_name', '!=', 'mail.mass_mailing.list')]}">
                                      <label for="contact_list_ids" string="Select mailing lists:" class="oe_edit_only"/>
                                      <field name="contact_list_ids" widget="many2many_tags"
                                          placeholder="Select mailing lists..." class="oe_inline"/>
                                  </div>
                              </div>
                          </group>
                          <notebook>
                              <page string="Mail Body">
                                  <field name="body_html" class="o_mail_body" widget="html_frame" options="{'editor_url': '/mass_mailing/field/email_template'}"/>
                              </page>
                              <page string="Options">
                                  <group>
                                      <group string="Mailing">
                                          <field name="email_from"/>
                                          <label for="reply_to"/>
                                          <div>
                                              <field name="reply_to_mode" widget="radio"
                                                  attrs="{'invisible': [('mailing_model_name', 'in', ['mail.mass_mailing.contact', 'res.partner', 'mail.mass_mailing.list'])]}"/>
                                              <field name="reply_to"
                                                  attrs="{'required': [('reply_to_mode', '=', 'email')], 'invisible': [('reply_to_mode', '=', 'thread')]}"/>
                                          </div>
                                          <label for="attachment_ids"/>
                                          <div>
                                              <field name="attachment_ids"  widget="many2many_binary" string="Attach a file" class="oe_inline"/>
                                          </div>
                                          <field name="schedule_date" />
                                          <field name="keep_archives" groups="base.group_no_one"/>
                                          <field name="create_date" readonly="1" attrs="{'invisible': [('create_date', '=', False)]}"/>
                                          <field name="sent_date" readonly="1" attrs="{'invisible': [('sent_date', '=', False)]}"/>
                                      </group>
                                      <group string="Campaign" groups="mass_mailing.group_mass_mailing_campaign">
                                          <field name="mass_mailing_campaign_id" string="Campaign"/>
                                          <label for="contact_ab_pc"/>
                                          <div>
                                              <field name="contact_ab_pc" class="oe_inline"/> %
                                          </div>
                                      </group>
                                  </group>
                              </page>
                          </notebook>
                      </sheet>
                  </form>
              </field>
          </record>
  
          <record model="ir.ui.view" id="view_mail_mass_mailing_kanban">
              <field name="name">mail.mass_mailing.kanban</field>
              <field name="model">mail.mass_mailing</field>
              <field name="arch" type="xml">
                  <kanban>
                      <field name='color'/>
                      <field name='total'/>
                      <field name='failed'/>
                      <field name='sent_date'/>
                      <templates>
                          <t t-name="kanban-box">
                              <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click oe_kanban_mass_mailing">
                                  <div class="o_dropdown_kanban dropdown">
                                      <a class="dropdown-toggle btn" data-toggle="dropdown" href="#" >
                                          <span class="fa fa-ellipsis-v"/>
                                      </a>
                                      <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                                          <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
                                          <t t-if="widget.deletable">
                                              <li><a type="delete">Delete</a></li>
                                          </t>
                                      </ul>
                                  </div>
                                   <div class="oe_kanban_content">
                                      <div class="o_kanban_record_top">
                                          <div class="o_kanban_record_headings">
                                              <h3 class="mt4 mb4"><field name="name"/></h3>
                                              <div class="o_kanban_record_subtitle" attrs="{'invisible': [('sent_date', '=', False)]}">
                                                  <h5 style="display: inline;"><field name="mass_mailing_campaign_id" groups="mass_mailing.group_mass_mailing_campaign"/></h5>
                                                  <t t-if="record.mass_mailing_campaign_id.raw_value" groups="mass_mailing.group_mass_mailing_campaign"> - </t><field name="sent_date"/>
                                              </div>
                                          </div>
                                      </div>
                                      <div class="o_kanban_record_body" attrs="{'invisible': [('sent_date', '=', False)]}">
                                          <t t-if="record.sent_date">
                                              <div class="row">
                                                  <div class="col-xs-8">
                                                      <a name="%(action_view_mail_mail_statistics_mailing)d"
                                                         context="{'search_default_filter_opened': True}"
                                                         type="action">Opened</a>
                                                  </div>
                                                  <div class="col-xs-4 text-right">
                                                      <field name="opened_ratio"/> %
                                                  </div>
                                              </div>
                                              <div class="row">
                                                  <div class="col-xs-8">
                                                      <a name="%(action_view_mail_mail_statistics_mailing)d"
                                                         context="{'search_default_filter_replied': True}"
                                                         type="action">Replied</a>
                                                  </div>
                                                  <div class="col-xs-4 text-right">
                                                      <field name="replied_ratio"/> %
                                                  </div>
                                              </div>
                                              <div class="row">
                                                  <div class="col-xs-8">
                                                      <a name="%(action_view_mass_mailing_links_statistics)d"
                                                         type="action">Clicks</a>
                                                  </div>
                                                  <div class="col-xs-4 text-right">
                                                      <field name="clicks_ratio"/> %
                                                  </div>
                                              </div>
                                              <div class='o_kanban_primary_bottom'>
                                                  <field name="delivered" widget="progressbar" title="Delivered" options="{'current_value': 'delivered', 'max_value': 'total', 'editable': false}"/>
                                              </div>
                                          </t>
                                      </div>
                                  </div>
                                  <div class="oe_clear"></div>
                              </div>
                          </t>
                      </templates>
                  </kanban>
              </field>
          </record>
  
          <record id="view_mail_mass_mailing_graph" model="ir.ui.view">
              <field name="name">mail.mass_mailing.graph</field>
              <field name="model">mail.mass_mailing</field>
              <field name="arch" type="xml">
                  <graph string="Mailing" type="bar">
                      <field name="state" type="row"/>
                  </graph>
              </field>
          </record>
  
          <record id="action_view_mass_mailings" model="ir.actions.act_window">
              <field name="name">Mailings</field>
              <field name="res_model">mail.mass_mailing</field>
              <field name="view_type">form</field>
              <field name="view_mode">kanban,tree,form,graph</field>
              <field name="context">{
                      'search_default_assigned_to_me': 1,
                      'default_user_id': uid,
              }</field>
              <field name="help" type="html">
                <p class="o_view_nocontent_smiling_face">
                  Create a new mailing
                </p><p>
                  No need of importing your mailing lists, you can easily
                  send emails to any contact saved in other Odoo apps.
                </p>
              </field>
          </record>
  
          <record id="action_view_mass_mailings_from_campaign" model="ir.actions.act_window">
              <field name="name">Mailings</field>
              <field name="res_model">mail.mass_mailing</field>
              <field name="view_type">form</field>
              <field name="view_mode">kanban,tree,form</field>
              <field name="context">{
                  'search_default_assigned_to_me': 1,
                  'search_default_mass_mailing_campaign_id': [active_id],
                  'default_mass_mailing_campaign_id': active_id,
                  'default_user_id': uid,
              }
              </field>
              <field name="help" type="html">
                <p class="o_view_nocontent_smiling_face">
                  Create a new mailing
                </p><p>
                  No need of importing your mailing lists, you can easily
                  send emails to any contact saved in other Odoo apps.
                </p>
              </field>
          </record>
  
          <record id="action_create_mass_mailings_from_campaign" model="ir.actions.act_window">
              <field name="name">Mailings</field>
              <field name="res_model">mail.mass_mailing</field>
              <field name="view_type">form</field>
              <field name="view_mode">form,kanban,tree</field>
              <field name="context">{
                  'search_default_assigned_to_me': 1,
                  'search_default_mass_mailing_campaign_id': [active_id],
                  'default_mass_mailing_campaign_id': active_id,
                  'default_user_id': uid,
              }
              </field>
              <field name="help" type="html">
                <p class="o_view_nocontent_smiling_face">
                  Create a new mailing
                </p><p>
                  No need of importing your mailing lists, you can easily
                  send emails to any contact saved in other Odoo apps.
                </p>
              </field>
          </record>
  
          <record id="action_create_ab_mass_mailings_from_campaign" model="ir.actions.act_window">
              <field name="name">Mailings</field>
              <field name="res_model">mail.mass_mailing</field>
              <field name="view_type">form</field>
              <field name="view_mode">form,kanban,tree</field>
              <field name="context">{
                  'search_default_assigned_to_me': 1,
                  'search_default_mass_mailing_campaign_id': [active_id],
                  'default_mass_mailing_campaign_id': active_id,
                  'default_contact_ab_pc': 10,
                  'default_user_id': uid,
              }
              </field>
              <field name="help" type="html">
                <p class="o_view_nocontent_smiling_face">
                  Create a new mailing
                </p><p>
                  No need of importing your mailing lists, you can easily
                  send emails to any contact saved in other Odoo apps.
                </p>
              </field>
          </record>
  
          <menuitem name="Mailings" id="menu_email_mass_mailings"
              parent="mass_mailing_menu" sequence="2"
              action="action_view_mass_mailings"/>
  
          <!--  MAILING CAMPAIGN STAGE !-->
          <record model="ir.ui.view" id="view_mail_mass_mailing_stage_search">
              <field name="name">mail.mass_mailing.stage.search</field>
              <field name="model">mail.mass_mailing.stage</field>
              <field name="arch" type="xml">
                 <search string="Mailings">
                      <field name="name"/>
                  </search>
              </field>
          </record>
  
          <record model="ir.ui.view" id="view_mail_mass_mailing_stage_tree">
              <field name="name">mail.mass_mailing.stage.tree</field>
              <field name="model">mail.mass_mailing.stage</field>
              <field name="priority">10</field>
              <field name="arch" type="xml">
                  <tree string="Mailings" editable="top">
                      <field name="sequence" widget="handle"/>
                      <field name="name"/>
                  </tree>
              </field>
          </record>
          <record id="action_view_mass_mailing_stages" model="ir.actions.act_window">
              <field name="name">Mailing Stages</field>
              <field name="res_model">mail.mass_mailing.stage</field>
              <field name="view_type">form</field>
              <field name="view_mode">tree,form</field>
              <field name="help" type="html">
                <p class="o_view_nocontent_smiling_face">
                  Create a new mass mailing stage
                </p>
              </field>
          </record>
  
          <menuitem id="menu_mass_mailing_configuration" name="Configuration" parent="mass_mailing_menu_root"
              sequence="100" groups="mass_mailing.group_mass_mailing_user"/>
  
          <menuitem name="Campaign Stages" id="menu_view_mass_mailing_stages"
              parent="menu_mass_mailing_configuration" sequence="1"
              groups="base.group_no_one,mass_mailing.group_mass_mailing_campaign"
              action="action_view_mass_mailing_stages"/>
  
          <!--  MAILING CAMPAIGN TAGS !-->
          <record id="mail_mass_mailing_tag_view_form" model="ir.ui.view">
              <field name="name">mail.mass_mailing.tag.form</field>
              <field name="model">mail.mass_mailing.tag</field>
              <field name="arch" type="xml">
                  <form string="Campaign Tags">
                      <group>
                          <field name="name"/>
                      </group>
                  </form>
              </field>
          </record>
          <record id="mass_mailing_tag_action" model="ir.actions.act_window">
              <field name="name">Campaign Tags</field>
              <field name="res_model">mail.mass_mailing.tag</field>
              <field name="view_type">form</field>
              <field name="help" type="html">
                <p class="o_view_nocontent_smiling_face">
                  Add a new tag
                </p>
              </field>
          </record>
  
          <menuitem id="mass_mailing_tag_menu" parent="menu_mass_mailing_configuration" action="mass_mailing_tag_action" sequence="2" groups="base.group_no_one"/>
  
  
          <!--  MAILING CAMPAIGNS !-->
          <record model="ir.ui.view" id="view_mail_mass_mailing_campaign_search">
              <field name="name">mail.mass_mailing.campaign.search</field>
              <field name="model">mail.mass_mailing.campaign</field>
              <field name="arch" type="xml">
                 <search string="Mailing Campaigns">
                      <field name="name" string="Campaigns"/>
                      <field name="tag_ids"/>
                      <field name="user_id"/>
                      <group expand="0" string="Group By">
                          <filter string="Stage" name="group_stage_id"
                              context="{'group_by': 'stage_id'}"/>
                          <filter string="Responsible" name="group_user_id"
                              context="{'group_by': 'user_id'}"/>
                      </group>
                  </search>
              </field>
          </record>
  
          <record model="ir.ui.view" id="view_mail_mass_mailing_campaign_tree">
              <field name="name">mail.mass_mailing.campaign.tree</field>
              <field name="model">mail.mass_mailing.campaign</field>
              <field name="priority">10</field>
              <field name="arch" type="xml">
                  <tree string="Mailing Campaigns">
                      <field name="name"/>
                      <field name="user_id"/>
                      <field name="stage_id"/>
                      <field name="tag_ids"/>
                  </tree>
              </field>
          </record>
  
          <record model="ir.ui.view" id="view_mail_mass_mailing_campaign_form">
              <field name="name">mail.mass_mailing.campaign.form</field>
              <field name="model">mail.mass_mailing.campaign</field>
              <field name="arch" type="xml">
                  <form string="Mailing Campaign">
                      <header style="min-height:31px;">
                          <button name="%(action_create_mass_mailings_from_campaign)d" type="action" class="oe_highlight" string="Send new Mailing"/>
                          <button name="%(action_create_ab_mass_mailings_from_campaign)d" type="action" class="oe_highlight" string="Send new A/B Testing Mailing"/>
                          <span><field name="stage_id" widget="statusbar" clickable="True"/></span>
                      </header>
                      <sheet>
                          <field name="total" invisible="1"/>
                          <div class="oe_button_box" name="button_box"
                              attrs="{'invisible': [('total', '=', 0)]}">
                              <button name="%(action_view_mass_mailings_from_campaign)d"
                                  type="action" class="oe_stat_button" icon="fa-envelope-o">
                                  <field name="total_mailings" widget="statinfo" string="Mailings"/>
                              </button>
                              <button name="%(action_view_mail_mail_statistics_mailing)d" type="action"
                                  icon="fa-envelope-o" class="oe_stat_button"
                                  attrs="{'invisible': [('sent', '=', 0)]}" >
                                  <field name="sent" string="Emails Sent" widget="statinfo"/>
                              </button>
                              <button name="%(action_view_mass_mailing_contacts)d"
                                  type="action" class="oe_stat_button">
                                  <field name="received_ratio" widget="percentpie" string="Received"/>
                              </button>
                              <button name="%(action_view_mass_mailing_contacts)d"
                                  type="action" class="oe_stat_button">
                                  <field name="opened_ratio" widget="percentpie" string="Opened"/>
                              </button>
                              <button name="%(action_view_mass_mailing_contacts)d"
                                  type="action" class="oe_stat_button">
                                  <field name="replied_ratio" widget="percentpie" string="Replied"/>
                              </button>
                              <button name="%(dropdb snipp)d"
                                  type="action" class="oe_stat_button">
                                  <field name="clicks_ratio" widget="percentpie" string="Clicks"/>
                              </button>
                          </div>
                          <group>
                              <field name="name" string="Campaign Name"/>
                              <field name="user_id"/>
                              <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}"/>
                              <field name="unique_ab_testing" groups="base.group_no_one"/>
                          </group>
                          <notebook>
                              <page string="Tracking">
                                  <group>
                                      <field name="medium_id" />
                                      <field name="source_id" />
                                  </group>
                              </page>
                              <page string="Related Mailings" groups="base.group_no_one">
                                  <field name="mass_mailing_ids" readonly="1" string="Related Mailing(s)">
                                      <tree>
                                          <field name="name"/>
                                          <field name="sent_date"/>
                                          <field name="state"/>
                                          <field name="delivered"/>
                                          <field name="opened"/>
                                          <field name="replied"/>
                                          <field name="bounced"/>
                                          <button name="action_duplicate" type="object" string="Duplicate"/>
                                      </tree>
                                  </field>
                              </page>
                          </notebook>
                      </sheet>
                  </form>
              </field>
          </record>
  
          <record model="ir.ui.view" id="view_mail_mass_mailing_campaign_kanban">
              <field name="name">mail.mass_mailing.campaign.kanban</field>
              <field name="model">mail.mass_mailing.campaign</field>
              <field name="arch" type="xml">
                  <kanban default_group_by='stage_id'>
                      <field name='total'/>
                      <field name='color'/>
                      <field name='user_id'/>
                      <field name='mass_mailing_ids'/>
                      <field name="stage_id"/>
                      <templates>
                          <t t-name="kanban-box">
                              <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">
                                  <div class="o_dropdown_kanban dropdown">
  
                                      <a class="dropdown-toggle btn" data-toggle="dropdown" href="#" >
                                          <span class="fa fa-ellipsis-v"/>
                                      </a>
                                      <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                                          <t t-if="widget.editable">
                                              <li><a type="edit">Settings</a></li>
                                          </t>
                                          <t t-if="widget.deletable">
                                              <li><a type="delete">Delete</a></li>
                                          </t>
                                          <li class="divider"/>
                                          <li class="dropdown-header">Colour</li>
                                          <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
                                      </ul>
                                  </div>
                                   <div class="oe_kanban_content">
                                      <div class="o_kanban_record_top mb16">
                                          <div class="o_kanban_record_headings">
                                              <h3 class="oe_margin_bottom_8 o_kanban_record_title"><field name="name"/></h3>
                                              <a name="%(action_view_mass_mailings_from_campaign)d" type="action"
                                                  class="oe_mailings o_kanban_record_subtitle">
                                                  <t t-raw="record.mass_mailing_ids.raw_value.length"/> Mailings
                                              </a>
                                          </div>
                                      </div>
                                      <div class="o_kanban_record_body">
                                          <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
                                      </div>
                                      <div class="o_kanban_record_bottom mt16" style="height:90px">
                                          <div class="oe_kanban_bottom_left" style="height:90px">
                                              <field name="delivered" widget="gauge" options="{'max_field': 'total', 'style': 'width:120px; height: 90px;'}"/>
                                              <div>
                                                  <strong>Opened</strong> <field name="opened_ratio"/> %<br />
                                                  <strong>Replied</strong> <field name="replied_ratio"/> % <br />
                                                  <strong>Clicks</strong> <field name="clicks_ratio"/> % <br />
                                              </div>
                                          </div>
                                          <div class="oe_kanban_bottom_right" style="height:90px">
                                              <img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="30" height="30" class="oe_kanban_avatar"/>
                                          </div>
                                      </div>
                                  </div>
                                  <div class="oe_clear"></div>
                              </div>
                          </t>
                      </templates>
                  </kanban>
              </field>
          </record>
  
          <record id="action_view_mass_mailing_campaigns" model="ir.actions.act_window">
              <field name="name">Mailing Campaigns</field>
              <field name="res_model">mail.mass_mailing.campaign</field>
              <field name="view_type">form</field>
              <field name="view_mode">kanban,tree,form</field>
              <field name="help" type="html">
                <p class="o_view_nocontent_smiling_face">
                  Create a new mailing campaign
                </p><p>
                  Create a campaign to structure mailing and get analysis from email status.
                </p>
              </field>
          </record>
  
          <menuitem name="Campaigns" id="menu_email_campaigns"
              parent="mass_mailing_menu_root" sequence="5"
              action="action_view_mass_mailing_campaigns"
              groups="mass_mailing.group_mass_mailing_campaign"/>
  
  </odoo>
  