Odoo Help


What do the [ ] mean in this python line : self.message_post(cr, uid, [new_id], body=_("Quotation created"), context=ctx)?

Pascal Tremblay
on 11/2/15, 9:53 PM 927 views

Hello all,

I don't know why the bold new_id is between [ ] in the second sentence??? What does it mean? What do the two [ ] do there?

    new_id = super(sale_order, self).create(cr, uid, vals, context=ctx)

    self.message_post(cr, uid, [new_id], body=_("Quotation created"), context=ctx)


A question title that tells people to open your question before they know what it is may be read by less people than a question title with more detail than "What do the [] mean in this python line please".

Bista Solutions US, Ray Carnes
on 11/2/15, 9:57 PM

Hello Pascal,

message_post method accepts either single ID or list of IDs and according to the type, method handles the passed ID(s).

You can see the source code of message_post() method.


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: 11/2/15, 9:53 PM
Seen: 927 times
Last updated: 11/3/15, 10:03 AM