69 lines
3.2 KiB
XML
69 lines
3.2 KiB
XML
<?xml version="1.0" ?>
|
|
<odoo>
|
|
<data>
|
|
|
|
<record id="view_emails_partner_info_form" model="ir.ui.view">
|
|
<field name="name">res.partner.emails.info.inherit</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="inherit_id" ref="base.view_partner_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='user_id']" position="after">
|
|
<field name='notify_email' widget="radio" groups="base.group_no_one"/>
|
|
<field name="opt_out" string="Mailing Opt-Out" groups="base.group_no_one"/>
|
|
<field name="message_bounce" groups="base.group_no_one"/>
|
|
</xpath>
|
|
<xpath expr="//sheet" position="after">
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids" widget="mail_followers"/>
|
|
<field name="message_ids" widget="mail_thread" options='{"thread_level": 1}'/>
|
|
</div>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="res_partner_opt_out_search">
|
|
<field name="name">res.partner.opt_out.search</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="inherit_id" ref="base.view_res_partner_filter"/>
|
|
<field name="arch" type="xml">
|
|
<filter name="supplier" position="after">
|
|
<separator />
|
|
<filter string="Available for mass mailing"
|
|
name='not_opt_out' domain="[('opt_out', '=', False)]"
|
|
help="Partners that did not ask not to be included in mass mailing campaigns" />
|
|
</filter>
|
|
</field>
|
|
</record>
|
|
|
|
<!--Definition of an email template with an empty body that will be used in partner mailing. Used to give a
|
|
basis for email recipients, name and to ease the definition of a further elaborated template. -->
|
|
<record id="email_template_partner" model="mail.template">
|
|
<field name="name">Partner Mass Mail</field>
|
|
<field name="model_id" ref="base.model_res_partner"/>
|
|
<field name="auto_delete" eval="True"/>
|
|
<field name="partner_to">${object.id}</field>
|
|
</record>
|
|
|
|
<!-- Replace the default mass-mailing wizard in base with the composition wizard -->
|
|
<act_window name="Partner Mass Mailing"
|
|
res_model="mail.compose.message"
|
|
src_model="res.partner"
|
|
view_mode="form"
|
|
multi="True"
|
|
target="new"
|
|
key2="client_action_multi"
|
|
id="action_partner_mass_mail"
|
|
context="{
|
|
'default_composition_mode': 'mass_mail',
|
|
'default_partner_to': '${object.id or \'\'}',
|
|
'default_use_template': True,
|
|
'default_template_id': ref('email_template_partner'),
|
|
}"/>
|
|
|
|
<record id="email_template_partner" model="mail.template">
|
|
<field name="ref_ir_act_window" ref="action_partner_mass_mail"/>
|
|
</record>
|
|
|
|
</data>
|
|
</odoo>
|