summaryrefslogtreecommitdiff
path: root/addons/crm_helpdesk
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2015-04-22 10:57:49 +0200
committerNicolas Lempereur <nle@odoo.com>2015-05-08 12:59:30 +0200
commitf2b8144bccf4d7b61bccfc36a892ae38f3b7b2d9 (patch)
tree63e717dd9f98dbbc3b46feda605fe280ab3ac98b /addons/crm_helpdesk
parenta1fab0489466950a62f50925a1d3ad45f70a699a (diff)
[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
Diffstat (limited to 'addons/crm_helpdesk')
-rw-r--r--addons/crm_helpdesk/crm_helpdesk.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/crm_helpdesk/crm_helpdesk.py b/addons/crm_helpdesk/crm_helpdesk.py
index c622d45da3a..8d7c85bf7a7 100644
--- a/addons/crm_helpdesk/crm_helpdesk.py
+++ b/addons/crm_helpdesk/crm_helpdesk.py
@@ -81,6 +81,7 @@ class crm_helpdesk(osv.osv):
'user_id': lambda s, cr, uid, c: uid,
'state': lambda *a: 'draft',
'date': fields.datetime.now,
+ 'team_id': lambda s, cr, uid, c: s.pool['crm.team']._get_default_team_id(cr, uid, context=c),
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c),
'priority': '1',
}