From 1748fa2aa0031b0cf01dee8d3dd516f86b7295f1 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Mon, 23 Jul 2018 16:32:46 +0200 Subject: [PATCH] [FIX] crm: fix access rights in test --- addons/crm/tests/test_lead2opportunity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/tests/test_lead2opportunity.py b/addons/crm/tests/test_lead2opportunity.py index 861444b3f7c..e4847b5bf45 100644 --- a/addons/crm/tests/test_lead2opportunity.py +++ b/addons/crm/tests/test_lead2opportunity.py @@ -38,7 +38,7 @@ class TestLead2opportunity2win(TestCrmCases): crm_case_3.message_post(subject='Test note', body='Détails envoyés par le client sur ​​le FAX pour la qualité') # I convert mass lead into opportunity customer. - mass = CrmLead2OpportunityPartnerMass.with_context({'active_model': 'crm.lead', 'active_ids': [crm_case_13.id, crm_case_2.id], 'active_id': crm_case_13.id}).create({ + mass = CrmLead2OpportunityPartnerMass.sudo(self.crm_salemanager.id).with_context({'active_model': 'crm.lead', 'active_ids': [crm_case_13.id, crm_case_2.id], 'active_id': crm_case_13.id}).create({ 'user_ids': [(6, 0, self.env.ref('base.user_root').ids)], 'team_id': self.env.ref("sales_team.team_sales_department").id })