odoo/addons/mail/wizard/mail_compose_message_view.xml

117 lines
6.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="email_compose_message_wizard_form">
<field name="name">mail.compose.message.form</field>
<field name="model">mail.compose.message</field>
<field name="arch" type="xml">
<form string="Compose Email" version="7.0">
<field name="composition_mode" nolabel="1" invisible="1"/>
<field name="model" nolabel="1" invisible="1"/>
<field name="res_id" nolabel="1" invisible="1"/>
<field name="parent_id" nolabel="1" invisible="1"/>
<field name="content_subtype" nolabel="1" invisible="1"/>
<group>
<field name="subject" placeholder="Subject..."/>
<field name="partner_ids" widget="many2many_tags" placeholder="Add contacts to notify..."
context="{'force_email':True}"
on_change="onchange_partner_ids(partner_ids)"/>
</group>
<notebook>
<page string="Body">
<field name="body_text" nolabel="1"
attrs="{'invisible':[('content_subtype', '=', 'html')]}"/>
<field name="body" nolabel="1"
attrs="{'invisible':[('content_subtype', '=', 'plain')]}"/>
</page>
<page string="Attachments">
<field name="attachment_ids" colspan="4" nolabel="1"/>
</page>
</notebook>
<footer>
<button string="Send" name="send_mail" type="object" class="oe_highlight" />
or
<button string="Cancel" class="oe_link" special="cancel" />
<div class="oe_right">
<button string="" name="toggle_content_subtype" type="object" icon="/mail/static/src/img/formatting.png"
help="Toggle advanced formatting mode"/>
</div>
</footer>
</form>
</field>
</record>
<record model="ir.ui.view" id="email_compose_message_wizard_form_chatter">
<field name="name">mail.compose.message.form.chatter</field>
<field name="model">mail.compose.message</field>
<field name="priority">18</field>
<field name="arch" type="xml">
<form string="Compose Email" version="7.0" >
<group>
<!-- truly invisible fields for control and options -->
<field name="composition_mode" colspan="2" nolabel="1" invisible="1"/>
<field name="model" colspan="2" nolabel="1" invisible="1"/>
<field name="res_id" colspan="2" nolabel="1" invisible="1"/>
<field name="parent_id" colspan="2" nolabel="1" invisible="1"/>
<field name="content_subtype" colspan="2" nolabel="1" invisible="1"/>
<!-- visible wizard -->
<field name="subject" colspan="2" nolabel="1" placeholder="Subject..."
class="oe_mail_compose_message_subject"
attrs="{'invisible':[('content_subtype', '=', 'plain')]}"/>
<field name="body_text" colspan="2" nolabel="1" placeholder="What are you working on ?"
class="oe_mail_compose_message_body"
attrs="{'invisible':[('content_subtype', '=', 'html')]}"/>
<field name="body" colspan="2" nolabel="1" placeholder="What are you working on ?"
class="oe_mail_compose_message_body_html"
attrs="{'invisible':[('content_subtype', '=', 'plain')]}"/>
<field name="partner_ids" colspan="2" nolabel="1" widget="many2many_tags" placeholder="Add contacts to notify..."
context="{'force_email':True}"
on_change="onchange_partner_ids(partner_ids)"
class="oe_mail_compose_message_partner_ids"/>
<field name="attachment_ids" colspan="2" nolabel="1" widget="many2many_tags"
placeholder="Add attachments..." invisible="1"
class="oe_mail_compose_message_attachment_ids"/>
<!-- void div to display attachments, Chatter-controlled -->
<div colspan="2" class="oe_mail_compose_message_attachments"/>
<!-- buttons, with as few Chatter logic as possible -->
<div>
<button name="send_mail" string="Post message" type="object"
class="oe_mail_compose_message_button_send"/>
</div>
<div class='oe_mail_compose_message_icons'>
<button icon="/mail/static/src/img/attachment.png"
class="oe_mail_compose_message_attachment" string=""
name="dummy"
help="Add an attachment"/>
<button icon="/mail/static/src/img/formatting.png"
class="oe_mail_compose_message_formatting" string=""
type="object" name="toggle_content_subtype"
help="Toggle advanced formatting mode"/>
</div>
</group>
</form>
</field>
</record>
<record id="action_email_compose_message_wizard" model="ir.actions.act_window">
<field name="name">Compose Email</field>
<field name="res_model">mail.compose.message</field>
<field name="src_model">mail.compose.message</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<!-- Replace the default mass-mailing wizard in base with the composition wizard -->
<act_window name="Mass Mailing"
res_model="mail.compose.message"
src_model="res.partner"
view_mode="form"
target="new"
key2="client_action_multi"
id="base.action_partner_mass_mail"
context="{'default_composition_mode': 'mass_mail'}"/>
</data>
</openerp>