[IMP]remove selectin subtype field & change name of obj
bzr revid: fka@tinyerp.com-20120816110306-q0mrqa2tp8128nmv
This commit is contained in:
@@ -278,9 +278,9 @@ class crm_lead(base_stage, osv.osv):
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
obj_id = super(crm_lead, self).create(cr, uid, vals, context)
|
||||
obj = self.browse(cr, uid, obj_id, context)
|
||||
if obj.user_id:
|
||||
self.message_subscribe(cr, uid, [obj_id], [obj.user_id.id], context = context)
|
||||
record = self.browse(cr, uid, obj_id, context)
|
||||
if record.user_id:
|
||||
self.message_subscribe(cr, uid, [obj_id], [record.user_id.id], context = context)
|
||||
self.create_send_note(cr, uid, [obj_id], context=context)
|
||||
return obj_id
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ class mail_message(osv.Model):
|
||||
select=True, ondelete='set null',
|
||||
help="Parent message, used for displaying as threads with hierarchy"),
|
||||
'child_ids': fields.one2many('mail.message', 'parent_id', 'Child Messages'),
|
||||
'subtype_id': fields.many2one('mail.message.subtype', 'Subtype', select = True),
|
||||
'subtype_id': fields.many2one('mail.message.subtype', 'Subtype'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
||||
@@ -273,7 +273,7 @@ class mail_thread(osv.Model):
|
||||
followers_obj = self.pool.get('mail.followers')
|
||||
subtype_obj = self.pool.get('mail.message.subtype')
|
||||
subtype_name = vals.get('subtype')
|
||||
sutype = False
|
||||
subtype = False
|
||||
body = vals.get('body_html', '') if vals.get('content_subtype') == 'html' else vals.get('body_text', '')
|
||||
if subtype_name:
|
||||
subtypes = subtype_obj.name_search(cr, uid, subtype_name)
|
||||
|
||||
Reference in New Issue
Block a user