Impacted versions: tested on 10.0 

What are the steps to reproduce your issue?

on runbot 10.0,

1. install mail and hr
2. create a new mail channel : 
   * name: test
   * who can follow : selected group of user
   * authorized group: Employee / Manager
   * auto subscription : Employee / Manager

3. edit the Demo user, and add hime to group Employee Managers

What is the current behavior that you observe?

when I go back to the test mail channel, the Demo user is not subscribed to the channel (only Admin is)

What would be your expected behavior in this case?

Demo user should be subscribed since he belongs to a group which should trigger auto subscription. There is some code in https://github.com/odoo/odoo/blob/9822c42707cab575b4a173b60569da1a1c6725aa/addons/mail/models/res_users.py#L83 which seems to be designed to handle this case, but it does not seem to be working. Upon closer look, this is because the web client is not sending groups_id, but sel_groups_xxxxxxx to write() => the if clause is never true => the auto subscription never happens. 

If I edit the Employee Manager group and add the Demo user, then it works as expected. 


opw782301
addons/mail/models/res_users.py
""" Redirect the posting of message on res.users as a private discussion.
            This is done because when giving the context of Chatter on the
            various mailboxes, we do not have access to the current partner_id. """
        current_pids = []
        partner_ids = kwargs.get('partner_ids', [])
        user_pid = self._message_post_get_pid()
        for partner_id in partner_ids:
            if isinstance(partner_id, (list, tuple)) and partner_id[0] == 4 and len(partner_id) == 2:
                current_pids.append(partner_id[1])
            elif isinstance(partner_id, (list, tuple)) and partner_id[0] == 6 and len(partner_id) == 3:
                current_pids.append(partner_id[2])
            elif isinstance(partner_id, (int, long)):
                current_pids.append(partner_id)
        if user_pid not in current_pids:
            partner_ids.append(user_pid)
        kwargs['partner_ids'] = partner_ids
        return self.env['mail.thread'].message_post(**kwargs)
    def message_update(self, msg_dict, update_vals=None):
        return True
    def message_subscribe(self, partner_ids=None, channel_ids=None, subtype_ids=None, force=True):
        return True
    @api.multi
    def message_partner_info_from_emails(self, emails, link_mail=False):
        return self.env['mail.thread'].message_partner_info_from_emails(emails, link_mail=link_mail)
    @api.multi
    def message_get_suggested_recipients(self):
        return dict((res_id, list()) for res_id in self._ids)
class res_groups_mail_channel(models.Model):