I am trying to create private channel programmatically in Odoo12 but while creating it is giving me error that: The requested operation cant be completed due to security restrictions.
Then I tried like:
self.env['mail.channel'].sudo().create({})
Then it is creating private channel as a superuser
But problem is that when I log in into my account I am unable to view that private channels because those were created by superuser.
How to display them or how to create private channel without sudo()?