From a929752e463204cd1b9c3c214edc25d6d6897d09 Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Thu, 16 Aug 2012 16:33:06 +0530 Subject: [PATCH] [IMP]remove selectin subtype field & change name of obj bzr revid: fka@tinyerp.com-20120816110306-q0mrqa2tp8128nmv --- addons/crm/crm_lead.py | 6 +++--- addons/mail/mail_message.py | 2 +- addons/mail/mail_thread.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 2e6a3b5514d..0ecc7d9bee2 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -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 diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index 3d0ea943d3a..a50d091f7ff 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -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 = { diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index 840cfbaaa37..ddace0cf9b9 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -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)