[IMP] default attachment_ids change based on onchange of template_id field.

bzr revid: ysa@tinyerp.com-20110228120440-tpacaidf6371b898
This commit is contained in:
Yogesh (OpenERP)
2011-02-28 17:34:40 +05:30
parent 9e752fb7f3
commit 3f3bcfdca2
@@ -118,7 +118,9 @@ class email_compose_message(osv.osv_memory):
value = email_temp_previ_pool.on_change_ref(cr, uid, [], resource_id, context)
vals.update(value.get('value',{}))
vals.update({'name': value.get('value',{}).get('subject','')})
vals.update({'attachment_ids' : email_temp_pool.read(cr, uid, template_id, ['attachment_ids'])['attachment_ids']})
else:
vals.update({'attachment_ids' : []})
return {'value': vals}
email_compose_message()