docker-odoo/16.0/extra-addons/openems/models/user.py
Arila Barnes 5594ca8d5d Added support for OpenEMS Odoo Add-ons
Signed-off-by: Arila Barnes <axmsoftware@Arilas-MacBook-Air-2.local>
2024-07-30 09:30:39 -07:00

38 lines
992 B
Python

from odoo import fields, models
class ResUsers(models.Model):
_inherit = "res.users"
branding_partner_id = fields.Many2one("res.partner", string="Branding Partner")
global_role = fields.Selection(
[
("admin", "Admin"),
("installer", "Installer"),
("owner", "Owner"),
("guest", "Guest"),
],
default="guest",
required=True,
)
device_role_ids = fields.One2many(
"openems.device_user_role", "user_id", string="Roles"
)
alerting_settings = fields.One2many(
"openems.alerting", "user_id", string="Alerting"
)
openems_language = fields.Selection(
[
("EN", "English"),
("DE", "German"),
("CZ", "Czech"),
("NL", "Dutch"),
("ES", "Spanish"),
("FR", "French"),
("HU", "Hungarian"),
("JA", "Japanese"),
],
default="DE",
required=True,
)