mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[REF] runbot: deduplicate res_users.py
Duplicate model inheritance for res.users
This commit is contained in:
parent
7542f41fff
commit
e66cd93c2c
@ -25,7 +25,6 @@ from . import res_users
|
|||||||
from . import runbot
|
from . import runbot
|
||||||
from . import team
|
from . import team
|
||||||
from . import upgrade
|
from . import upgrade
|
||||||
from . import user
|
|
||||||
from . import version
|
from . import version
|
||||||
|
|
||||||
# those imports have to be at the end otherwise the sql view cannot be initialised
|
# those imports have to be at the end otherwise the sql view cannot be initialised
|
||||||
|
@ -10,6 +10,10 @@ class ResUsers(models.Model):
|
|||||||
runbot_team_ids = fields.Many2many('runbot.team', string="Runbot Teams")
|
runbot_team_ids = fields.Many2many('runbot.team', string="Runbot Teams")
|
||||||
github_login = fields.Char('Github account')
|
github_login = fields.Char('Github account')
|
||||||
|
|
||||||
|
# Add default action_id
|
||||||
|
action_id = fields.Many2one('ir.actions.actions',
|
||||||
|
default=lambda self: self.env.ref('runbot.open_view_warning_tree', raise_if_not_found=False))
|
||||||
|
|
||||||
_sql_constraints = [
|
_sql_constraints = [
|
||||||
(
|
(
|
||||||
"github_login_unique",
|
"github_login_unique",
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
|
|
||||||
from odoo import models, fields
|
|
||||||
|
|
||||||
|
|
||||||
class User(models.Model):
|
|
||||||
_inherit = 'res.users'
|
|
||||||
|
|
||||||
# Add default action_id
|
|
||||||
action_id = fields.Many2one('ir.actions.actions',
|
|
||||||
default=lambda self: self.env.ref('runbot.open_view_warning_tree', raise_if_not_found=False))
|
|
Loading…
Reference in New Issue
Block a user