mirror of
https://github.com/bringout/oca-ocb-security.git
synced 2026-04-25 17:22:01 +02:00
19.0 vanilla
This commit is contained in:
parent
20ddc1b4a3
commit
c0efcc53f5
1162 changed files with 125577 additions and 105287 deletions
|
|
@ -1,6 +1,7 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import api, models
|
||||
from odoo.tools import SQL
|
||||
|
||||
|
||||
class AlarmManager(models.AbstractModel):
|
||||
|
|
@ -8,5 +9,7 @@ class AlarmManager(models.AbstractModel):
|
|||
|
||||
@api.model
|
||||
def _get_notify_alert_extra_conditions(self):
|
||||
res = super()._get_notify_alert_extra_conditions()
|
||||
return f'{res} AND "event"."google_id" IS NULL'
|
||||
base = super()._get_notify_alert_extra_conditions()
|
||||
if self.env.context.get('alarm_type') == 'email':
|
||||
return SQL("%s AND event.google_id IS NULL", base)
|
||||
return base
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue