Skip to Content
Menu
This question has been flagged

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!

Avatar
Discard
Best Answer

Might be transaction is rollback due to other issue on raise or something else. Can you please try with self_cr.commit()?

Avatar
Discard
Related Posts Replies Views Activity
1
Nov 19
5965
1
Sep 19
2138
0
Jul 17
4925
1
Jun 16
5977
0
Mar 15
3604