mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[12.0][ADD] web_company_color (#1253)
This commit is contained in:
committed by
Bernat Puig Font
parent
dd34be2563
commit
eb7cc01f30
14
web_company_color/hooks.py
Normal file
14
web_company_color/hooks.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# Copyright 2019 Alexandre Díaz <dev@redneboa.es>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
from odoo import api, SUPERUSER_ID
|
||||
from .models.res_company import URL_BASE
|
||||
|
||||
|
||||
def uninstall_hook(cr, registry):
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
env["ir.attachment"].search([('url', 'like', '%s%%' % URL_BASE)]).unlink()
|
||||
|
||||
|
||||
def post_init_hook(cr, registry):
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
env['res.company'].search([]).scss_create_or_update_attachment()
|
||||
Reference in New Issue
Block a user