summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/crm/crm_lead.py5
-rw-r--r--addons/website_crm/tests/test_website_crm.py2
-rw-r--r--addons/website_hr_recruitment/tests/test_website_hr_recruitment.py2
3 files changed, 4 insertions, 5 deletions
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index d88c63d42c5..7970a2c933b 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -61,7 +61,7 @@ class crm_lead(format_address, osv.osv):
def _get_default_stage_id(self, cr, uid, context=None):
""" Gives default stage_id """
- team_id = self.pool['crm.team']._get_default_team_id(cr, uid, context=context)
+ team_id = self.pool['crm.team']._get_default_team_id(cr, SUPERUSER_ID, context=context, user_id=uid)
return self.stage_find(cr, uid, [], team_id, [('fold', '=', False)], context=context)
def _resolve_type_from_context(self, cr, uid, context=None):
@@ -197,7 +197,6 @@ class crm_lead(format_address, osv.osv):
# Only used for type opportunity
'probability': fields.float('Probability', group_operator="avg"),
'planned_revenue': fields.float('Expected Revenue', track_visibility='always'),
- 'phone': fields.char("Phone", size=64),
'date_deadline': fields.date('Expected Closing', help="Estimate of the date on which the opportunity will be won."),
# CRM Actions
'last_activity_id': fields.many2one("crm.activity", "Last Activity", select=True),
@@ -237,7 +236,7 @@ class crm_lead(format_address, osv.osv):
'type': lambda s, cr, uid, c: 'lead' if s.pool['res.users'].has_group(cr, uid, 'crm.group_use_lead') else 'opportunity',
'user_id': lambda s, cr, uid, c: uid,
'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c),
- 'team_id': lambda s, cr, uid, c: s.pool['crm.team']._get_default_team_id(cr, uid, context=c),
+ 'team_id': lambda s, cr, uid, c: s.pool['crm.team']._get_default_team_id(cr, SUPERUSER_ID, context=c, user_id=uid),
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.lead', context=c),
'priority': lambda *a: crm_stage.AVAILABLE_PRIORITIES[0][0],
'probability': 10,
diff --git a/addons/website_crm/tests/test_website_crm.py b/addons/website_crm/tests/test_website_crm.py
index 1f684478b81..d97cee5f55d 100644
--- a/addons/website_crm/tests/test_website_crm.py
+++ b/addons/website_crm/tests/test_website_crm.py
@@ -4,7 +4,7 @@ import openerp.tests
@openerp.tests.common.post_install(True)
class TestWebsiteCrm(openerp.tests.HttpCase):
def test_tour(self):
- self.phantom_js("/", "odoo.__DEBUG__.services['web.Tour'].run('website_crm_tour', 'test')", "odoo.__DEBUG__.services['web.Tour'].tours.website_crm_tour", login='admin')
+ self.phantom_js("/", "odoo.__DEBUG__.services['web.Tour'].run('website_crm_tour', 'test')", "odoo.__DEBUG__.services['web.Tour'].tours.website_crm_tour")
# need environment using the test cursor as it's not committed
cr = self.registry.cursor()
diff --git a/addons/website_hr_recruitment/tests/test_website_hr_recruitment.py b/addons/website_hr_recruitment/tests/test_website_hr_recruitment.py
index 96753811766..9cf70411ec3 100644
--- a/addons/website_hr_recruitment/tests/test_website_hr_recruitment.py
+++ b/addons/website_hr_recruitment/tests/test_website_hr_recruitment.py
@@ -4,7 +4,7 @@ import openerp.tests
@openerp.tests.common.post_install(True)
class TestWebsiteHrRecruitmentForm(openerp.tests.HttpCase):
def test_tour(self):
- self.phantom_js("/", "odoo.__DEBUG__.services['web.Tour'].run('website_hr_recruitment_tour', 'test')", "odoo.__DEBUG__.services['web.Tour'].tours.website_hr_recruitment_tour", login="admin")
+ self.phantom_js("/", "odoo.__DEBUG__.services['web.Tour'].run('website_hr_recruitment_tour', 'test')", "odoo.__DEBUG__.services['web.Tour'].tours.website_hr_recruitment_tour")
# get test cursor to read from same transaction browser is writing to
cr = self.registry.cursor()