[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:
parent
d63731b65f
commit
f7883303b4
|
@ -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,
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue