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

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

By
Pascal Tremblay
on 11/2/15, 9:53 PM 560 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)


Thanks

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
1

Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
4341
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. Your Odoo/OpenERP Solution, just an email away!

Serpent Consulting Services Pvt. Ltd.
On 11/3/15, 1:14 AM

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.

Thanks.

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