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

[17.0][FIX] contract: Malformed expression in the column_invisible attribute. #1195

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

adasatorres
Copy link
Contributor

Good morning, we have identified an error when creating a contract template for suppliers. This error occurs because the following Python expression is being evaluated in a column_invisible attribute.

parent.contract_type == 'purchase' and not is_auto_renew

According to the Odoo documentation (https://github.com/odoo/documentation/blob/8f1d5d428c2bbb6f420577d02c28d5eef7678096/content/developer/reference/user_interface/view_architectures/generic_attribute_column_invisible.rst), I understand that in these cases, it is not possible to use the values from the tree in the expression. Instead, one must use the values from the parent or a value from the context.

I’m attaching a screenshot of the error.
Captura desde 2025-02-13 11-11-11

Copy link

@jorgeglez1990 jorgeglez1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM functionally reviewed.

Copy link

@Christian-RB Christian-RB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one not blocking suggestion

@pedrobaeza pedrobaeza added this to the 17.0 milestone Feb 13, 2025
<p> <strong>#END#</strong>: End date of the invoiced period</p>
<p> <strong
>#INVOICEMONTHNAME#</strong>: Invoice month name of the invoiced period</p>
<p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid these changes that are not related

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, but I have an extension in the VS code that pre-formats when I save the changes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, deactivate it for contributing to OCA, please. Undo this change and I think it's OK.

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 17.0-ocabot-merge-pr-1195-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 616f868 into OCA:17.0 Feb 14, 2025
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 55eac65. Thanks a lot for contributing to OCA. ❤️

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

Successfully merging this pull request may close these issues.

5 participants