# -*- coding: utf-8 -*-
from odoo import fields, models, api


class User(models.Model):

    _inherit = 'res.users'

    notification_type = fields.Selection([
        ('email', 'Handle by Emails'),
        ('inbox', 'Handle in Odoo')],
        'Notification Management', required=True, default='inbox',
        help="Policy on how to handle Chatter notifications:\n"
             "- Handle by Emails: notifications are sent to your email address\n"
             "- Handle in Odoo: notifications appear in your Odoo Inbox")
    # phone = fields.Char(string='Phone', size=20)

    # create_ids = fields.Many2many(comodel_name='res.groups', compute='_get_groups')
    #
    # @api.one
    # @api.depends('groups_id')
    # def _get_groups(self):
    #     res = []
    #     for g in self.groups_id:
    #         if g.create_ids:
    #             res += g.create_ids.ids
    #     self.create_ids = res
