-
-
Notifications
You must be signed in to change notification settings - Fork 827
[15.0][FIX][project_timesheet_time_control] Error: AttributeError: type object 'expression' has no attribute AND #1092
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
Conversation
Hi @ernestotejeda, |
Error: AttributeError: type object 'expression' has no attribute AND
Is this problem reproducible in runboat (accessible from "Runbot | Try me" button in the readme)? If not, the problem is in your deployment method, mangling import paths. |
Yes, the problem is reproducible in runboat. These are the steps to reach the error:
` File "/opt/odoo/odoo/fields.py", line 2659, in _description_domain The above exception was the direct cause of the following exception: Traceback (most recent call last): |
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.
Curious that this works for timesheet managers, but not timesheet users.
Let's fast-track it to fix the problem:
/ocabot merge patch
On my way to merge this fine PR! |
Congratulations, your PR was merged at cedba4c. Thanks a lot for contributing to OCA. ❤️ |
I think that works for timesheet managers but not timesheet users becouse the expression Thanks a lot Pedro for the fast merge. |
It seems that "expression" is not correctly imported from odoo.osv.
This causes the error:
"AttributeError: type object 'expression' has no attribute 'AND'" when this code block is executed:
return expression.AND( [ domain, [ "|", ("privacy_visibility", "!=", "followers"), ("message_partner_ids", "in", [self.env.user.partner_id.id]), ], ] )