Odoo Help

Welcome!

This community 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.

0

How to use self.write using SUPERUSER_ID

By
Giezel Esteves
on 7/27/16, 9:14 PM 225 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

--Francesco OpenCode--
3608
| 5 7 9
Grottaglie, Italy
--Francesco OpenCode--

Italian Odoo (OpenERP) Modules Developer LINKEDIN: http://www.linkedin.com/in/francescoapruzzese

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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