<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com>
     License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->

<openerp>
<data>

<record model="ir.ui.view" id="view_mail_mass_mailing_form">
    <field name="name">Add event and exclude</field>
    <field name="model">mail.mass_mailing</field>
    <field name="inherit_id" ref="mass_mailing.view_mail_mass_mailing_form"/>
    <field name="arch" type="xml">
        <field name="mailing_domain" position="attributes">
            <attribute name="context">{'search_default_not_opt_out': 1, 'exclude_mass_mailing': active_id}</attribute>
        </field>
        <notebook position="before">
            <group>
                <group>
                    <field name="event_id"/>
                </group>
                <group>
                    <field name="exclude_event_state_ids"
                           widget="many2many_tags"
                           options="{'no_create_edit': True}"
                           attrs="{'invisible': [('event_id', '=', False)]}"/>
                </group>
            </group>
        </notebook>
    </field>
</record>

</data>
</openerp>
