[FIX] email_template: added icon for button 'Save As Template' and change string and changes in search method domain for save_as_template()

bzr revid: rha@tinyerp.com-20110426122054-p4jcrk9zzt97dp8i
This commit is contained in:
Rifakat Haradwala (Open ERP) 2011-04-26 17:50:54 +05:30
parent d63731b65f
commit f7883303b4
2 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,7 @@ class email_compose_message(osv.osv_memory):
values['attachment_ids'] = att_ids
return {'value': values}
def save_as_new_template(self, cr, uid, ids, context=None):
def save_as_template(self, cr, uid, ids, context=None):
'''
create a new template record
'''
@ -88,7 +88,7 @@ class email_compose_message(osv.osv_memory):
template_pool = self.pool.get('email.template')
model_pool = self.pool.get('ir.model')
for record in self.browse(cr, uid, ids, context=context):
model = model_pool.search(cr, uid, [('name','=', record.model)])[0]
model = model_pool.search(cr, uid, [('model','=', record.model)])[0]
values = {
'name': record.model,
'email_from': record.email_from or False,

View File

@ -14,7 +14,7 @@
on_change="on_change_template(template_id, context)"/>
</xpath>
<xpath expr="//button[@string='Close']" position="after">
<button icon="" type="object" name="save_as_new_template" string="Save As New Template"/>
<button icon="gtk-new" type="object" name="save_as_template" string="Save As Template"/>
</xpath>
</data>
</field>