No permission when use "INSERT" in many2many table? Odoo 9
Hello everybody, I have a problem, I need use a query of postgresql with INSERT in a many2many table (exactly this one "mail_message_res_partner_rel") but It only works if I execute the query with the admin user, when I use it with a normal user nothing happens and I don't know if is a permission problem or something.
This is my query:
self._cr.execute("INSERT INTO mail_message_res_partner_rel (mail_message_id, res_partner_id) VALUES (%s, %s)", (res_id,dest))
Anyone could help me? Thanks!