You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
508 B

  1. # Copyright 2019 Alexandre Díaz <dev@redneboa.es>
  2. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
  3. from odoo import api, SUPERUSER_ID
  4. from .models.res_company import URL_BASE
  5. def uninstall_hook(cr, registry):
  6. env = api.Environment(cr, SUPERUSER_ID, {})
  7. env["ir.attachment"].search([('url', 'like', '%s%%' % URL_BASE)]).unlink()
  8. def post_init_hook(cr, registry):
  9. env = api.Environment(cr, SUPERUSER_ID, {})
  10. env['res.company'].search([]).scss_create_or_update_attachment()