rpc_helper: migrate to v16
parent
9d023eff8a
commit
220ec5964b
|
@ -5,8 +5,8 @@
|
|||
{
|
||||
"name": "Disable RPC",
|
||||
"summary": """Helpers for disabling RPC calls""",
|
||||
"version": "14.0.1.1.1",
|
||||
"development_status": "Alpha",
|
||||
"version": "16.0.1.0.0",
|
||||
"development_status": "Beta",
|
||||
"license": "LGPL-3",
|
||||
"website": "https://github.com/OCA/server-tools",
|
||||
"author": "Camptocamp, Odoo Community Association (OCA)",
|
||||
|
|
|
@ -9,7 +9,7 @@ from odoo.tools.translate import _
|
|||
|
||||
def protected__execute_cr(cr, uid, obj, method, *args, **kw):
|
||||
# Same as original func in odoo.service.model.execute_cr
|
||||
odoo.api.Environment.reset() # clean cache etc if we retry the same transaction
|
||||
cr.reset()
|
||||
recs = odoo.api.Environment(cr, uid, {}).get(obj)
|
||||
if recs is None:
|
||||
raise UserError(_("Object %s doesn't exist", obj))
|
||||
|
|
|
@ -10,7 +10,7 @@ from odoo.tests import common
|
|||
|
||||
|
||||
@common.tagged("post_install", "-at_install")
|
||||
class TestXMLRPC(common.HttpSavepointCase):
|
||||
class TestXMLRPC(common.HttpCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
|
@ -23,7 +23,7 @@ class TestXMLRPC(common.HttpSavepointCase):
|
|||
self.env["ir.model"]._get("res.partner").rpc_config_edit = json.dumps(
|
||||
{"disable": val}
|
||||
)
|
||||
self.env["ir.model"].flush()
|
||||
self.env.flush_all()
|
||||
|
||||
def tearDown(self):
|
||||
klass = type(self.env["res.partner"])
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
../../../../rpc_helper
|
|
@ -0,0 +1,6 @@
|
|||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['setuptools-odoo'],
|
||||
odoo_addon=True,
|
||||
)
|
Loading…
Reference in New Issue