Odoo Help

0

How to use self.write using SUPERUSER_ID

By
Giezel Esteves
on 7/27/16, 9:14 PM 727 views

Hi, I have a certain field that I want to modify but It's not possible for me to do that 'coz I'm restricted by the record rule. So what I'm going to do is to use SUPERUSER_ID but I don't know how to do it. Any help?

Ex.

    self.write({'to_approve_by':[(6,0,[to_approve_by])]})

'to_approve_by' is a many2many field


2
Francesco OpenCode
On 7/28/16, 5:57 AM

self.sudo().write({'to_approve_by':[(6,0,[to_approve_by])]})

Thanks so much. It helps me a lot

Giezel Esteves
on 7/28/16, 10:05 PM

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

Question tools

1 follower(s)

Stats

Asked: 7/27/16, 9:14 PM
Seen: 727 times
Last updated: 7/28/16, 10:05 PM