You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)
at handleError (/web/assets/1182-077fe86/web.assets_common.min.js:1247:101)
at owl.App.handleError (web/assets/1182-077fe86/web.assets_common.min.js:2077:29)
at Fiber._render (/web/assets/1182-077fe86/web.assets_common.min.js:1478:19)
at Fiber.render (/web/assets/1182-077fe86/web.assets_common.min.js:1476:6)
at ComponentNode.initiateRender (web/assets/1182-077fe86/web.assets_common.min.js:1555:47)
Caused by: SyntaxError: Unexpected identifier 'ctx'
at new Function (<anonymous>)
at compile (/web/assets/1182-077fe86/web.assets_common.min.js:2040:370)
at owl.App._compileTemplate (/web/assets/1182-077fe86/web.assets_common.min.js:2095:300)
at owl.App._compileTemplate (/web/assets/1182-077fe86/web.assets_common.min.js:2105:83)
at owl.App.getTemplate (/web/assets/1182-077fe86/web.assets_common.min.js:1699:118)
at new ComponentNode (/web/assets/1182-077fe86/web.assets_common.min.js:1550:133)
at /web/assets/1182-077fe86/web.assets_common.min.js:2075:6
at Field.template (eval at compile (/web/assets/1182-077fe86/web.assets_common.min.js:2040:370), <anonymous>:18:31)
at Fiber._render (/web/assets/1182-077fe86/web.assets_common.min.js:1477:96)
at Fiber.render (/web/assets/1182-077fe86/web.assets_common.min.js:1476:6)
but this works as expected:
<t t-if="! condition">
The text was updated successfully, but these errors were encountered:
Since not is not part of the spec (as far as I know), it has not been translated into !, which is why your code fails. So:
we can update the spec and add it to the list of keywords that are replaced
just not do anything.
I am not completely comfortable with increasing the distance between the expression in the template and the corresponding javascript expression, so I think that in this case, the correct decision is to just keep owl as it is.
I agree with Géry. The reason the other ones are supported is to avoid having to use encoded XML entities in the middle of expressions as it greatly reduces legibility, in particular & and < need to be encoded in attributes, which is why we have to allow for alternate forms of &&, < and <=. The rest exist for consistency/symmetry of comparisons even though they're not stricly needed. The purpose here is not to allow python syntax in expressions, in fact none of the comparisons are valid python anyway, but I can understand why one might think that. We should probably clarify the docs on that front. We could even enable a warning at compilation time in dev mode, since not is probably not a common variable name.
raises error:
but this works as expected:
The text was updated successfully, but these errors were encountered: