From f2b8144bccf4d7b61bccfc36a892ae38f3b7b2d9 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Wed, 22 Apr 2015 10:57:49 +0200 Subject: [IMP] crm: set user partner team as default team This fix sets the first sales team of the current user as the default sales team if no other one is given. For models: crm.lead, crm.phonecall, crm.claim, crm.helpdesk, project.issue, sale.order, account.invoice Existing methods are removed and new methods in sales team model (crm.team) have to be called when needed. closes #6438 opw-633562 --- addons/project_issue/project_issue.py | 1 + 1 file changed, 1 insertion(+) (limited to 'addons/project_issue/project_issue.py') diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 7c836e7bb7d..52e97c42317 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -294,6 +294,7 @@ class project_issue(osv.Model): _defaults = { 'active': 1, + 'team_id': lambda s, cr, uid, c: s.pool['crm.team']._get_default_team_id(cr, uid, context=c), 'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c), 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c), 'priority': '0', -- cgit v1.2.3