[FIX] crm: fixed bug in m2m between sales teams and stages introduced
authorThibault Delavallée <tde@openerp.com>
Thu, 13 Nov 2014 16:32:39 +0000 (17:32 +0100)
committerThibault Delavallée <tde@openerp.com>
Thu, 13 Nov 2014 16:32:39 +0000 (17:32 +0100)
when cleaning the models. The m2m table name is different when defined
in sales_team or in stages, leading to a quie strange behavior.

addons/crm/sales_team.py

index c76d9ea..71f32a8 100644 (file)
@@ -39,7 +39,7 @@ class crm_team(osv.Model):
 
     _columns = {
         'resource_calendar_id': fields.many2one('resource.calendar', "Working Time", help="Used to compute open days"),
-        'stage_ids': fields.many2many('crm.stage', 'crm_stage_team_rel', 'team_id', 'stage_id', 'Stages'),
+        'stage_ids': fields.many2many('crm.stage', 'crm_team_stage_rel', 'team_id', 'stage_id', 'Stages'),
         'use_leads': fields.boolean('Leads',
             help="The first contact you get with a potential customer is a lead you qualify before converting it into a real business opportunity. Check this box to manage leads in this sales team."),
         'use_opportunities': fields.boolean('Opportunities', help="Check this box to manage opportunities in this sales team."),