Skip to content

Instantly share code, notes, and snippets.

@sehrishnaz
Created August 11, 2020 10:57
Show Gist options
  • Select an option

  • Save sehrishnaz/744d72ed8795c5c7b16abff35a7357c5 to your computer and use it in GitHub Desktop.

Select an option

Save sehrishnaz/744d72ed8795c5c7b16abff35a7357c5 to your computer and use it in GitHub Desktop.
Web.login_layout QWebException | <t t-call="web.login_layout"> | QWebException: "'NoneType' object has no attribute 'name'" while evaluating 'res_company.name'
class TestClass(http.Controller):
@http.route('/test/', type='http', auth='public')
def test_function(self, redirect=None, **kw):
if request.httprequest.method == 'POST':
return request.render('module_name.my_custom_form', {
'error': 'error message goes here',
'data': data,
})
# To resolve this issue modify above controller with below one
class TestClass(http.Controller):
@http.route('/test/', type='http', auth='public', website=True)
def test_function(self, redirect=None, **kw):
if request.httprequest.method == 'POST':
return request.render('module_name.my_custom_form', {
'error': 'error message goes here',
'data': data,
})
@sehrishnaz
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment