Odoo Help

0

Add followers to Sales order

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

0

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.

(OR)

    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.

Register

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)

Stats

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