Odoo Help


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.


Add followers to Sales order

Ashish Singh
on 1/28/15, 10:17 AM 772 views

How can I add followers in created method. Like I have 2 user and in created method I have id of 2 user. So how can I add These two User ID In Message follower ids filde In Sale Order Form


Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
| 5 3 8
Puducherry, India
--Atchuthan - Technical Consultant, Sodexis Inc--
Passionate coder in Python/Odoo(formerly known as OpenERP).

Contact me via GMail: atchuthantu@gmail.com via Skype: atchuthan_skype
via Linkedin: http://in.linkedin.com/in/atchuthantu
Atchuthan - Technical Consultant, Sodexis Inc
On 1/29/15, 12:05 AM

You can either add track_visibility="onchange" to those 2 user_id fields

'user_id': fields.many2one('res.users', 'Salesperson', states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, select=True, track_visibility='onchange'),

Usually this is preferred as Odoo automatically sets the user responsible if the field is changed.


    def create(self, cr, uid, vals, context=None):
        create_id = super(sale_order, self).create(cr, uid, vals, context)
        self.message_subscribe_users(cr, uid, [create_id], user_ids=[YOUR LIST OF USER IDS], context=context)
        return create_id

It doesn't work Sir.

Ana trajano
on 1/7/16, 2:14 AM

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)


Asked: 1/28/15, 10:17 AM
Seen: 772 times
Last updated: 3/16/15, 8:10 AM