Odoo Help


Add followers to Sales order

Ashish Singh
on 1/28/15, 10:17 AM 1,561 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 5 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

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: 1/28/15, 10:17 AM
Seen: 1561 times
Last updated: 3/16/15, 8:10 AM