Odoo Help

0
2 Answers
2
Ibrahim
10/30/18, 3:34 AM

Hi Risser, 

to run it as a superadmin, simply add sudo() like this : 

env['mail.followers'].search([('res_id','=',record.id),('res_model','=','crm.lead'),('partner_id.name','like','<')]).sudo().unlink()
1
Avatar

subbarao

--subbarao--

908
| 4 1 4
Chennai, India
--subbarao--


subbarao
10/30/18, 3:33 AM

Try this

env['mail.followers'].search([('res_id','=',record.id),('res_model','=','crm.lead'),('partner_id.name','like','<')]).sudo().unlink()

Ask a Question
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now