Odoo Help

0

0
3 Answers
0
tuyenvn
4/18/19, 11:32 PM

Hi Atchuthan, 

So how can i remove followers in python code? :)

0
Avatar

Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
4327
| 6 6 10
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
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.

(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

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

It doesn't work Sir.

Ask a Question
Writer
Tag
Keep Informed
1 follower(s)
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