NEW] Add methods to disable web push notifications

This commit is contained in:
Thomas Pot
2026-04-28 19:38:21 +02:00
parent ac071ceeff
commit cae36e2c60

View File

@@ -50,6 +50,8 @@ class IrLogging(models.Model):
self.env.cr.execute("""DELETE FROM account_online_link WHERE id > 0;""") self.env.cr.execute("""DELETE FROM account_online_link WHERE id > 0;""")
if self.env['ir.model'].search([('model','=','account.journal')]): if self.env['ir.model'].search([('model','=','account.journal')]):
self.env.cr.execute("""UPDATE account_journal set bank_statements_source = 'undefined';""") self.env.cr.execute("""UPDATE account_journal set bank_statements_source = 'undefined';""")
if self.env['ir.model'].search([('model','=','mail.partner.device')]):
self.env.cr.execute("""DELETE FROM mail_partner_device;""")
ip_ok = False ip_ok = False
with os.popen("ip a") as f: with os.popen("ip a") as f:
for x in f.readlines(): for x in f.readlines():