[REM] email_template: removed overrided chatter form view; updated legacy wizard form view.

bzr revid: tde@openerp.com-20121017092938-8ulu2h3ml9on4iu9
This commit is contained in:
Thibault Delavallée 2012-10-17 11:29:38 +02:00
parent cb3463780a
commit ae1985702b
2 changed files with 8 additions and 29 deletions

View File

@ -24,7 +24,8 @@ import tools
from osv import osv
from osv import fields
class mail_compose_message(osv.osv_memory):
class mail_compose_message(osv.TransientModel):
_inherit = 'mail.compose.message'
def _get_templates(self, cr, uid, context=None):

View File

@ -8,38 +8,16 @@
<field name="inherit_id" ref="mail.email_compose_message_wizard_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="//form/footer/button" position="before">
<field name="use_template" invisible="1"/>
<button icon="gtk-paste" type="object" name="toggle_template"
string="" help="Use a message template" invisible="1"/>
<button icon="gtk-save" type="object" name="save_as_template"
string="" help="Save as a new template" invisible="1"/>
</xpath>
<xpath expr="//form/notebook" position="after">
<group attrs="{'invisible':[('use_template','=',False)]}" colspan="4" col="4">
<field name="use_template" invisible="1"/>
<field name="template_id" colspan="3" invisible="1"
<group attrs="{'invisible':[('use_template','=',False)]}">
<field name="use_template" invisible="1"
on_change="onchange_use_template(use_template, template_id, composition_mode, model, res_id, context)"/>
<field name="template_id"
on_change="onchange_template_id(use_template, template_id, composition_mode, model, res_id, context)"/>
</group>
</xpath>
</data>
</field>
</record>
<record model="ir.ui.view" id="email_compose_message_wizard_inherit_form_chatter">
<field name="name">mail.compose.message.form</field>
<field name="model">mail.compose.message</field>
<field name="inherit_id" ref="mail.email_compose_message_wizard_form_chatter"/>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='partner_ids']" position="after">
<field name="use_template" colspan="2" nolabel="1" invisible="1"
on_change="onchange_use_template(use_template, template_id, composition_mode, model, res_id, context)"/>
<field name="template_id" colspan="2" nolabel="1"
attrs="{'invisible':[('use_template','=',False)]}"
on_change="onchange_template_id(use_template, template_id, composition_mode, model, res_id, context)"/>
</xpath>
<xpath expr="//button[@name='dummy']" position="before">
<xpath expr="//form/footer/button" position="after">
<button icon="/email_template/static/src/img/email_template.png"
type="object" name="toggle_template" string=""
help="Use a message template"