Skip to content

Instantly share code, notes, and snippets.

@josemoralesp
Created June 21, 2018 14:50
Show Gist options
  • Save josemoralesp/bf2e2cbf548ac0647f40c87c35861780 to your computer and use it in GitHub Desktop.
Save josemoralesp/bf2e2cbf548ac0647f40c87c35861780 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
import logging
from odoo import SUPERUSER_ID, api
_logger = logging.getLogger(__name__)
def remove_website(cr):
with api.Environment.manage():
env = api.Environment(cr, SUPERUSER_ID, {})
module = env.ref('base.module_website')
module.button_uninstall()
def migrate(cr, version):
if not version:
return
remove_website(cr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment