[IMP] sale_margin: Use odoo instead of openerp

Closes #23451
This commit is contained in:
Swapnesh Shah
2018-03-06 09:52:54 +01:00
committed by Martin Trigaux
parent 943a32851a
commit ff4c49b9d8
+3 -3
View File
@@ -2,8 +2,8 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from functools import partial
import openerp
from openerp import api, SUPERUSER_ID
import odoo
from odoo import api, SUPERUSER_ID
from . import models # noqa
from . import report # noqa
@@ -11,7 +11,7 @@ from . import report # noqa
def uninstall_hook(cr, registry):
def recreate_view(dbname):
db_registry = openerp.modules.registry.Registry.new(dbname)
db_registry = odoo.modules.registry.Registry.new(dbname)
with api.Environment.manage(), db_registry.cursor() as cr:
env = api.Environment(cr, SUPERUSER_ID, {})
if 'sale.report' in env: