Files
odoo_source/addons/mail/wizard/mail_compose_message_views.xml
T
Julien Carion (juca) 6c412be2ea [IMP] *: coherent hotkey uses
This commit makes hotkey uses more coherent throughout the entire
codebase by setting alt+q as main shortcurt for confirm and default
actions and alt+x for cancel actions.

task-3370463

closes odoo/odoo#127469

Related: odoo/enterprise#43694
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-19 18:24:15 +02:00

101 lines
7.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<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="groups_id" eval="[Command.link(ref('base.group_user'))]"/>
<field name="arch" type="xml">
<form string="Compose Email" class="pt-0 pb-0 o_mail_composer_form" js_class="mail_composer_form">
<group>
<!-- truly invisible fields for control and options -->
<field name="author_id" invisible="1"/>
<field name="auto_delete" invisible="1"/>
<field name="auto_delete_keep_log" invisible="1"/>
<field name="composition_batch" invisible="1"/>
<field name="composition_mode" invisible="1"/>
<field name="email_layout_xmlid" invisible="1"/>
<field name="force_send" invisible="1"/>
<field name="lang" invisible="1"/>
<field name="mail_server_id" invisible="1"/>
<field name="model" invisible="1"/>
<field name="model_is_thread" invisible="1"/>
<field name="parent_id" invisible="1"/>
<field name="record_name" invisible="1"/>
<field name="render_model" invisible="1"/>
<field name="res_domain" invisible="1"/>
<field name="res_domain_user_id" invisible="1"/>
<field name="res_ids" invisible="1"/>
<field name="scheduled_date" invisible="1"/>
<field name="subtype_id" invisible="1"/>
<field name="subtype_is_log" invisible="1"/>
<field name="use_exclusion_list" invisible="1"/>
<!-- visible wizard -->
<field name="email_from"
attrs="{'invisible':[('composition_mode', '!=', 'mass_mail')]}"/>
<label for="partner_ids" string="Recipients" attrs="{'invisible': [('composition_mode', '!=', 'comment')]}"/>
<div groups="base.group_user" attrs="{'invisible': [('composition_mode', '!=', 'comment')]}">
<span name="document_followers_text" attrs="{'invisible':['|', ('model', '=', False), ('composition_mode', '=', 'mass_mail')]}">Followers of the document and</span>
<field name="partner_ids" widget="many2many_tags_email" placeholder="Add contacts to notify..."
context="{'force_email':True, 'show_email':True}"/>
</div>
<field name="subject" placeholder="Welcome to MyCompany!" required="True"/>
</group>
<field name="can_edit_body" invisible="1"/>
<div attrs="{'invisible': [('composition_mode', '=', 'mass_mail')]}">
<field name="body" class="oe-bordered-editor" placeholder="Write your message here..." options="{'style-inline': true}" attrs="{'readonly': [('can_edit_body', '=', False)]}" force_save="1"/>
<group>
<field name="attachment_ids" widget="many2many_binary" string="Attach a file" nolabel="1" colspan="2"/>
<field name="template_id" string="Load template" options="{'no_create': True}"
context="{'default_model': model, 'default_body_html': body, 'default_subject': subject}"/>
</group>
</div>
<notebook attrs="{'invisible': [('composition_mode', '!=', 'mass_mail')]}">
<page string="Content">
<div>
<field name="body" class="oe-bordered-editor" placeholder="Write your message here..." options="{'style-inline': true}" attrs="{'readonly': [('can_edit_body', '=', False)]}" force_save="1"/>
<group>
<field name="attachment_ids" widget="many2many_binary" string="Attach a file" nolabel="1" colspan="2"/>
<field name="template_id" string="Load template" options="{'no_create': True}"
context="{'default_model': model, 'default_body_html': body, 'default_subject': subject}"/>
</group>
</div>
</page>
<page string="Settings">
<!-- mass mailing -->
<field name="reply_to_force_new" invisible="1"/>
<field name="reply_to_mode" attrs="{'invisible':[('composition_mode', '!=', 'mass_mail')]}" widget="radio"/>
<group>
<field name="reply_to" string="Reply-to Address" placeholder='e.g: "info@mycompany.odoo.com"'
attrs="{'invisible':['|', ('reply_to_mode', '=', 'update'), ('composition_mode', '!=', 'mass_mail')],
'required':[('reply_to_mode', '!=', 'update'), ('composition_mode', '=', 'mass_mail')]}"/>
</group>
</page>
</notebook>
<footer>
<button string="Send" name="action_send_mail"
type="object" class="btn-primary o_mail_send" data-hotkey="q"
attrs="{'invisible': [('subtype_is_log', '=', True)]}"/>
<button string="Log" name="action_send_mail"
type="object" class="btn-primary" data-hotkey="q"
attrs="{'invisible': [('subtype_is_log', '=', False)]}"/>
<button string="Discard" class="btn-secondary" special="cancel" data-hotkey="x" />
<button icon="fa-lg fa-save" type="object"
name="action_save_as_template" string="Save as new template"
attrs="{'invisible': [('can_edit_body', '=', False)]}"
class="float-end btn-secondary" help="Save as a new template" data-hotkey="w"/>
</footer>
</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="binding_model_id" ref="mail.model_mail_compose_message"/>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</data>
</odoo>