-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[16.0][FIX] web_field_tooltip: access to ir.model and ir.model.fields… #2823
[16.0][FIX] web_field_tooltip: access to ir.model and ir.model.fields… #2823
Conversation
rec.env["ir.model.fields"].sudo().browse(rec.proxy_field_id.id) | ||
if rec.proxy_field_id | ||
else False | ||
) |
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.
same here with the field
|
||
id = fields.Integer() | ||
name = fields.Char(string="Model Name") | ||
description = fields.Char(translate=True) |
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.
the SQL view won't handle the translate properly. So maybe a compute would be better here. All fields should be readonly too.
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.
The SQL view extract the jsonb so declaring the field translate=True enable the Odoo mechanism to handle it properly.
_logger = logging.getLogger(__name__) | ||
|
||
|
||
@openupgrade.migrate(use_env=True) |
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.
I don't think we should use openupgrade only for two simple queries.
1ae099c
to
70efc5a
Compare
/ocabot merge minor |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at aa0d32a. Thanks a lot for contributing to OCA. ❤️ |
If you are not admin you can't create any new tooltip as a tooltips manager because of the access to ir.model and ir.model.fields. Giving read access to this specific tooltip manager group seems to be acceptable.