diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 9dd021183f4..ba05269c474 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -652,7 +652,7 @@ class crm_case_section_custom(osv.osv): 'sequence': fields.integer('Sequence'), 'user_id': fields.many2one('res.users', 'Responsible User'), 'reply_to': fields.char('Reply-To', size=64, help="The email address put in the 'Reply-To' of all emails sent by Open ERP about cases in this section"), - 'parent_id': fields.many2one('crm.case.section', 'Parent Section'), + 'parent_id': fields.many2one('crm.case.section.custom', 'Parent Section'), 'note': fields.text('Notes'), } @@ -668,7 +668,7 @@ class crm_case_section_custom(osv.osv): def _check_recursion(self, cr, uid, ids): level = 100 while len(ids): - cr.execute('SELECT DISTINCT parent_id FROM crm_case_section '\ + cr.execute('SELECT DISTINCT parent_id FROM crm_case_section_custom '\ 'WHERE id IN %s', (tuple(ids),)) ids = filter(None, map(lambda x:x[0], cr.fetchall())) diff --git a/addons/crm/wizard/crm_custom_create_menu.py b/addons/crm/wizard/crm_custom_create_menu.py index 2d0bb8947f1..8cf8619c074 100644 --- a/addons/crm/wizard/crm_custom_create_menu.py +++ b/addons/crm/wizard/crm_custom_create_menu.py @@ -45,7 +45,7 @@ class crm_case_custom_create_menu(osv.osv_memory): """ data_obj = self.pool.get('ir.model.data') for this in self.browse(cr, uid, ids, context=context): - domain = [('section_id', '=', this.section_id)] + domain = [('section_id', '=', this.section_id.id)] view_mode = [this.view_tree and 'tree', this.view_form and 'form', this.view_calendar and 'calendar'] view_mode = filter(None , view_mode) action_id = self.pool.get('ir.actions.act_window').create(cr,uid, { diff --git a/addons/crm/wizard/crm_forward_to_partner.py b/addons/crm/wizard/crm_forward_to_partner.py index fb607eefdbc..1e323eddedb 100644 --- a/addons/crm/wizard/crm_forward_to_partner.py +++ b/addons/crm/wizard/crm_forward_to_partner.py @@ -48,7 +48,7 @@ class crm_lead_forward_to_partner(osv.osv_memory): _defaults = { 'name' : 'email', - 'history': 'latest', + 'history': 'info', 'add_cc': True, 'email_from': lambda self, cr, uid, *a: self.pool.get('res.users')._get_email_from(cr, uid, uid)[uid] }