Odoo Help


Add current user to a session

on 2/9/16, 8:02 AM 265 views

We're trying to modify the behaviour of the example given in odoo website( https://www.odoo.com/documentation/8.0/howtos/backend.html#wizards ), and we want to add a button in the session view that when pressed, adds the current user in the session as an attendee

def add_user(self):
    self.attendee_ids |= self._uid

That doesn't work because _uid is just the id, while session.attendee_ids returns res.partners (3, 45, 32 ... ), so we want to add the id (which is just the integer) into res.partners (3, 45, 32 ..., 1)

On 2/10/16, 5:34 AM

Hi Juan,

This code will help you.

Carlos DuAl
On 2/10/16, 6:00 AM

Just a small addition to what Jothimani said,  for me it worked with browse(self._uid) instead of browse(uid)

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


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)


Asked: 2/9/16, 8:02 AM
Seen: 265 times
Last updated: 2/10/16, 6:00 AM