[ADD] base modules
This commit is contained in:
5
queue_job_subscribe/models/__init__.py
Executable file
5
queue_job_subscribe/models/__init__.py
Executable file
@@ -0,0 +1,5 @@
|
||||
# Copyright 2016 Cédric Pigeon
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import queue_job
|
||||
from . import res_users
|
||||
13
queue_job_subscribe/models/queue_job.py
Executable file
13
queue_job_subscribe/models/queue_job.py
Executable file
@@ -0,0 +1,13 @@
|
||||
# Copyright 2016 Cédric Pigeon
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class QueueJob(models.Model):
|
||||
_inherit = "queue.job"
|
||||
|
||||
def _subscribe_users_domain(self):
|
||||
domain = super()._subscribe_users_domain()
|
||||
domain.append(("subscribe_job", "=", True))
|
||||
return domain
|
||||
18
queue_job_subscribe/models/res_users.py
Executable file
18
queue_job_subscribe/models/res_users.py
Executable file
@@ -0,0 +1,18 @@
|
||||
# Copyright 2016 Cédric Pigeon
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResUsers(models.Model):
|
||||
|
||||
_inherit = "res.users"
|
||||
|
||||
subscribe_job = fields.Boolean(
|
||||
"Job Notifications",
|
||||
default=True,
|
||||
help="If this flag is checked and the "
|
||||
"user is Connector Manager, he will "
|
||||
"receive job notifications.",
|
||||
index=True,
|
||||
)
|
||||
Reference in New Issue
Block a user