The type fields of actions already defaults to the model name in the base model definition. Therefore, specifying `ir.actions.server`, `ir.actions.act_window` & so on as type is useless (and adds noise since it's the same as the action model). closes odoo/odoo#114539 Related: odoo/enterprise#37855 Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
58 lines
3.2 KiB
XML
58 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<record id="mail_template_preview_view_form" model="ir.ui.view">
|
|
<field name="name">mail.template.preview.view.form</field>
|
|
<field name="model">mail.template.preview</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Email Preview">
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<h3>Preview of <field name="mail_template_id" readonly="1" nolabel="1" options="{'no_open': True}"/></h3>
|
|
</div>
|
|
<div class="alert alert-danger" role="alert" attrs="{'invisible': [('error_msg', '=', False)]}">
|
|
<field name="error_msg" />
|
|
</div>
|
|
<field name="no_record" invisible="1"/>
|
|
|
|
<group>
|
|
<label for="resource_ref" string="Test Record: "/>
|
|
<field name="resource_ref" readonly="False" nolabel="1"
|
|
options="{'hide_model': True, 'no_create': True, 'no_open': True}"
|
|
attrs="{'invisible': [('no_record', '=', True)]}"/>
|
|
<b attrs="{'invisible': [('no_record', '=', False)]}" class="text-warning">No record for this model</b>
|
|
|
|
<field name="lang" string="Force a Language:" placeholder="Select a language"/>
|
|
|
|
<field name="subject"/>
|
|
<field name="email_from" attrs="{'invisible': [('email_from', '=', False)]}"/>
|
|
<field name="partner_ids" widget="many2many_tags" attrs="{'invisible': [('partner_ids', '=', [])]}"/>
|
|
<field name="email_to" attrs="{'invisible': [('email_to', '=', False)]}"/>
|
|
<field name="email_cc" attrs="{'invisible': [('email_cc', '=', False)]}"/>
|
|
<field name="reply_to" attrs="{'invisible': [('reply_to', '=', False)]}"/>
|
|
<field name="scheduled_date" attrs="{'invisible': [('scheduled_date', '=', False)]}"/>
|
|
|
|
<field name="body_html" widget="html" colspan="2" nolabel="1" options="{'safe': True}"/>
|
|
<field name="attachment_ids" widget="many2many_binary"/>
|
|
</group>
|
|
</sheet>
|
|
<footer>
|
|
<button string="Close" class="btn-secondary" special="cancel" data-hotkey="z"/>
|
|
</footer>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="mail_template_preview_action" model="ir.actions.act_window">
|
|
<field name="name">Template Preview</field>
|
|
<field name="res_model">mail.template.preview</field>
|
|
<field name="binding_model_id" eval="False"/>
|
|
<field name="view_mode">form</field>
|
|
<field name="view_id" ref="mail_template_preview_view_form"/>
|
|
<field name="target">new</field>
|
|
<field name="context">{'default_mail_template_id':active_id}</field>
|
|
</record>
|
|
|
|
</data>
|
|
</odoo>
|