flectra/addons/mail/views/res_partner_views.xml

82 lines
4.2 KiB
XML
Raw Normal View History

<?xml version="1.0" ?>
2018-01-16 11:34:37 +01:00
<flectra>
<data>
<record id="res_partner_view_form_inherit_mail" model="ir.ui.view">
<field name="name">res.partner.view.form.inherit.mail</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="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="activity_ids" widget="mail_activity"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</xpath>
</field>
</record>
<record id="res_partner_view_search_inherit_mail" model="ir.ui.view">
<field name="name">res.partner.view.search.inherit.mail</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" />
<separator/>
<filter string="My Activities" name="activities_my"
domain="[('activity_ids.user_id', '=', uid)]"/>
<separator/>
<filter string="Late Activities" name="activities_overdue"
domain="[('activity_ids.date_deadline', '&lt;', context_today().strftime('%Y-%m-%d'))]"
help="Show all records which has next action date is before today"/>
<filter string="Today Activities" name="activities_today"
domain="[('activity_ids.date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
<filter string="Future Activities" name="activities_upcoming_all"
domain="[('activity_ids.date_deadline', '&gt;', context_today().strftime('%Y-%m-%d'))
]"/>
<separator/>
</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>
2018-01-16 11:34:37 +01:00
</flectra>