Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't call client methods because of the request #845

Open
BettoISC opened this issue Dec 27, 2019 · 0 comments
Open

Can't call client methods because of the request #845

BettoISC opened this issue Dec 27, 2019 · 0 comments

Comments

@BettoISC
Copy link

BettoISC commented Dec 27, 2019

when we use the config wizard to execute a method it throws an error, checking the code, we think maybe using the client_env this problem could be solved.

getattr(client_env[model], method)()

odoo.addons.saas_server.controllers.main: global name 'request' is not defined
Traceback (most recent call last):
File "/opt/odoo/addons/10.0/odoo-saas-tools/saas_server/controllers/main.py", line 23, in wrap
return f(*args, **kw)
File "/opt/odoo/addons/10.0/odoo-saas-tools/saas_server/controllers/main.py", line 142, in upgrade_database
result = client.upgrade_database(data=state.get('data'))
File "/opt/odoo/addons/10.0/odoo-saas-tools/saas_server/models/saas_server.py", line 253, in upgrade_database
return self._upgrade_database(env, **kwargs)
File "/opt/odoo/addons/10.0/odoo-saas-tools/saas_server/models/saas_server.py", line 287, in _upgrade_database
getattr(request.registry[model], method)()
NameError: global name 'request' is not defined

getattr(request.registry[model], method)()


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant