-
-
Notifications
You must be signed in to change notification settings - Fork 558
[18.0][FIX] contract line successor: use parent.is_auto_renew to avoid EvalError in column_invisible #1254
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
[18.0][FIX] contract line successor: use parent.is_auto_renew to avoid EvalError in column_invisible #1254
Conversation
Hi @sbejaoui, |
67454d0
to
f8c6a94
Compare
f8c6a94
to
c657971
Compare
c657971
to
e03d038
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Anxo82 I’ve tested the described case and the error no longer occurs. I’d say this works fine now from a functional point of view. LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Technical review
This PR has the |
@pedrobaeza Could we merge this FIX? THX! 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ocabot merge patch
On my way to merge this fine PR! |
Congratulations, your PR was merged at 0efa8f0. Thanks a lot for contributing to OCA. ❤️ |
@HaraldPanten
[T-8579]
When creating a new contract template and selecting "supplier" as the contract_type, show an EvalError "Can not evaluate python expression: (bool(parent.contract_type == 'purchase' and not is_auto_renew))"
The fix replaces
is_auto_renew
withparent.is_auto_renew
to ensure the expression is evaluated correctly in the context of the parent form. To make this work, the is_auto_renew field was added as a computed Boolean field on the contract.template model.