[12.0][ADD] web_company_color (#1253)

This commit is contained in:
Alexandre Díaz
2019-05-23 08:55:31 +02:00
committed by Bernat Puig Font
parent dd34be2563
commit eb7cc01f30
16 changed files with 866 additions and 0 deletions

View 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()