Skip to Content
Menu
This question has been flagged
2 Replies
5336 Views

when I login for portal users 


Odoo Server Error - Access Error

Sorry, you are not allowed to create this kind of document. Only users with the following access level are currently allowed to do that:

- User types/Internal User


(Document model: mail.channel) - (Operation: create, User: 6) 

when i changed the login view 

<input type="hidden" name="redirect" t-att-value="redirect"/>

to 

<input type="hidden" name="redirect" t-att-value="/"/>

then 

when clicking to login link 

Error 500


2019-08-19 15:19:30,719 7 ERROR 799ae-test-540458 odoo.addons.website.models.ir_http: 500 Internal Server Error:

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/tools/cache.py", line 88, in lookup
r = d[key]
File "/home/odoo/src/odoo/odoo/tools/func.py", line 69, in wrapper
return func(self, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/tools/lru.py", line 44, in __getitem__
a = self.d[obj].me
KeyError: ('ir.qweb', <function IrQWeb.compile at 0x7f162e15c488>, 173, ('en_US', None, None, None, False, 1))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 305, in compile
body = self._compile_node(element, _options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 666, in _compile_node
return body + self._compile_directives(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 687, in _compile_directives
return compile_handler(el, options)
File "/home/odoo/src/odoo/addons/web_editor/models/ir_qweb.py", line 78, in _compile_directive_tag
return super(QWeb, self)._compile_directive_tag(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 1020, in _compile_directive_tag
content = self._compile_directives(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 687, in _compile_directives
return compile_handler(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 1083, in _compile_directive_content
body.extend(self._compile_node(item, options))
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 666, in _compile_node
return body + self._compile_directives(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 687, in _compile_directives
return compile_handler(el, options)
File "/home/odoo/src/odoo/addons/web_editor/models/ir_qweb.py", line 78, in _compile_directive_tag
return super(QWeb, self)._compile_directive_tag(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 1020, in _compile_directive_tag
content = self._compile_directives(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 687, in _compile_directives
return compile_handler(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 1425, in _compile_directive_call
body = self._compile_directive_content(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 1083, in _compile_directive_content
body.extend(self._compile_node(item, options))
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 666, in _compile_node
return body + self._compile_directives(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 687, in _compile_directives
return compile_handler(el, options)
File "/home/odoo/src/odoo/addons/web_editor/models/ir_qweb.py", line 78, in _compile_directive_tag
return super(QWeb, self)._compile_directive_tag(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 1020, in _compile_directive_tag
content = self._compile_directives(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 687, in _compile_directives
return compile_handler(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 1083, in _compile_directive_content
body.extend(self._compile_node(item, options))
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 666, in _compile_node
return body + self._compile_directives(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 687, in _compile_directives
return compile_handler(el, options)
File "/home/odoo/src/odoo/addons/web_editor//models/ir_qweb.py", line 78, in _compile_directive_tag
return super(QWeb, self)._compile_directive_tag(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 1023, in _compile_directive_tag
return self._compile_tag(el, content, options, False)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 989, in _compile_tag
body.extend(self._compile_all_attributes(el, options, attr_already_created))
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 928, in _compile_all_attributes
items = self._compile_static_attributes(el, options) + self._compile_dynamic_attributes(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 891, in _compile_dynamic_attributes
nodes.append((name[6:], self._compile_expr(value)))
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_qweb.py", line 421, in _compile_expr
st = ast.parse(expr.strip(), mode='eval')
File "/usr/lib/python3.6/ast.py", line 35, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 1
/
^
SyntaxError: unexpected EOF while parsing

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 203, in _dispatch
result = request.dispatch()
File "/home/odoo/src/odoo/odoo/http.py", line 835, in dispatch
r = self._call_function(**self.params)
File "/home/odoo/src/odoo/odoo/http.py", line 346, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/http.py", line 342, in checked_call
result.flatten()
File "/home/odoo/src/odoo/odoo/http.py", line 1270, in flatten
self.response.append(self.render())
File "/home/odoo/src/odoo/odoo/http.py", line 1263, in render
return env["ir.ui.view"].render_template(self.template, self.qcontext)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_ui_view.py", line 1299, in render_template
return self.browse(self.get_view_id(template)).render(values, engine)
File "/home/odoo/src/odoo/addons/website/models/ir_ui_view.py", line 315, in render
return super(View, self).render(values, engine=engine, minimal_qcontext=minimal_qcontext)
File "/home/odoo/src/odoo/addons/web_editor/models/ir_ui_view.py", line 27, in render
return super(IrUiView, self).render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_ui_view.py", line 1308, in render
return self.env[engine].render(self.id, qcontext)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_qweb.py", line 59, in render
result = super(IrQWeb, self).render(id_or_xml_id, values=values, **context)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 274, in render
self.compile(template, options)(self, body.append, values or {})
File "<decorator-gen-54>", line 2, in compile
File "/home/odoo/src/odoo/odoo/tools/cache.py", line 93, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_qweb.py", line 114, in compile
return super(IrQWeb, self).compile(id_or_xml_id, options=options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 316, in compile
raise QWebException("Error when compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name)
odoo.addons.base.models.qweb.QWebException: unexpected EOF while parsing (<unknown>, line 1)
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/tools/cache.py", line 88, in lookup
r = d[key]
File "/home/odoo/src/odoo/odoo/tools/func.py", line 69, in wrapper
return func(self, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/tools/lru.py", line 44, in __getitem__
a = self.d[obj].me
KeyError: ('ir.qweb', <function IrQWeb.compile at 0x7f162e15c488>, 173, ('en_US', None, None, None, False, 1))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 305, in compile
body = self._compile_node(element, _options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 666, in _compile_node
return body + self._compile_directives(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 687, in _compile_directives
return compile_handler(el, options)
File "/home/odoo/src/odoo/addons/web_editor/models/ir_qweb.py", line 78, in _compile_directive_tag
return super(QWeb, self)._compile_directive_tag(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 1020, in _compile_directive_tag
content = self._compile_directives(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 687, in _compile_directives
return compile_handler(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 1083, in _compile_directive_content
body.extend(self._compile_node(item, options))
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 666, in _compile_node
return body + self._compile_directives(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 687, in _compile_directives
return compile_handler(el, options)
File "/home/odoo/src/odoo/addons/web_editor/models/ir_qweb.py", line 78, in _compile_directive_tag
return super(QWeb, self)._compile_directive_tag(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 1020, in _compile_directive_tag
content = self._compile_directives(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 687, in _compile_directives
return compile_handler(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 1425, in _compile_directive_call
body = self._compile_directive_content(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 1083, in _compile_directive_content
body.extend(self._compile_node(item, options))
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 666, in _compile_node
return body + self._compile_directives(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 687, in _compile_directives
return compile_handler(el, options)
File "/home/odoo/src/odoo/addons/web_editor/models/ir_qweb.py", line 78, in _compile_directive_tag
return super(QWeb, self)._compile_directive_tag(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 1020, in _compile_directive_tag
content = self._compile_directives(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 687, in _compile_directives
return compile_handler(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 1083, in _compile_directive_content
body.extend(self._compile_node(item, options))
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 666, in _compile_node
return body + self._compile_directives(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 687, in _compile_directives
return compile_handler(el, options)
File "/home/odoo/src/odoo/addons/web_editor/models/ir_qweb.py", line 78, in _compile_directive_tag
return super(QWeb, self)._compile_directive_tag(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 1023, in _compile_directive_tag
return self._compile_tag(el, content, options, False)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 989, in _compile_tag
body.extend(self._compile_all_attributes(el, options, attr_already_created))
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 928, in _compile_all_attributes
items = self._compile_static_attributes(el, options) + self._compile_dynamic_attributes(el, options)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 891, in _compile_dynamic_attributes
nodes.append((name[6:], self._compile_expr(value)))
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_qweb.py", line 421, in _compile_expr
st = ast.parse(expr.strip(), mode='eval')
File "/usr/lib/python3.6/ast.py", line 35, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 1
/
^
SyntaxError: unexpected EOF while parsing

Error when compiling AST
SyntaxError: unexpected EOF while parsing (<unknown>, line 1)
Template: 173
Path: /templates/t/t/form/input[2]
Node: <input type="hidden" name="redirect" t-att-value="/"/>

what i can do to fix it?

please help me

Avatar
Discard
Author Best Answer

replace:

<input type="hidden" name="redirect" t-att-value="/"/>​

with:


<input type="hidden" name="redirect" t-att-value="redirect and '/'"/>


Avatar
Discard

Sorry, but it's not working in my case.

Best Answer

Hi Mustafa,

I was also facing this same issue. However I somehow resolved this error by creating another virtual environment. In the new virtual environment, I've reinstalled all the python packages.

Hope this helps.

Thanks

Avatar
Discard
Related Posts Replies Views Activity
0
Feb 20
2
1
Jul 19
3183
1
Apr 19
2461
0
Dec 18
2063
1
May 20
3478