[FIX] mail, email_template: prevent user from creating

templates in the templat_idm2o field on the wizard; prevent users from
creating models in the model_id m2o field on the template form view.
This commit is contained in:
Thibault Delavallée 2014-08-13 12:22:51 +02:00
parent 868a77616d
commit 9d370f6e31
2 changed files with 2 additions and 1 deletions

View File

@ -10,7 +10,7 @@
<div class="oe_title">
<label for="name" class="oe_edit_only"/><h1><field name="name" required="1"/></h1>
<group>
<field name="model_id" required="1" on_change="onchange_model_id(model_id)"/>
<field name="model_id" required="1" on_change="onchange_model_id(model_id)" options="{'no_create': True}"/>
<field name="model" invisible="1"/>
</group>
</div>

View File

@ -12,6 +12,7 @@
<div>Use template
<!--FIX: To avoid css issue of many2one field in footer temporary used oe_form (BUG:1152464)-->
<field name="template_id" nolabel="1" class='oe_inline'
options="{'no_create': True}"
on_change="onchange_template_id(template_id, composition_mode, model, res_id, context)" domain="[('model_id.model','=',model)]"
context="{'default_model': model, 'default_body_html': body, 'default_subject': subject}"/>
</div>