-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
W8301 fires all the time #493
Comments
Which is the error W8301? Apart from that, I see this code weird: product = self.env['product.product'].search([('id', '=', self.product_id.id)]) Do product = self.env['product.product'].browse(self.product_id.id) but even better just do |
The warning I get is: Use lazy % formatting in odoo._ functionsPylintW8301:translation-not-lazy Really odd. Still get the warning after testing both of your suggestions: I work through docker containers. I wonder if I am missing a pip package?? I base my image from the odoo/docker Upgrade pip wheel and install pip packagesRUN pip3 install --upgrade pip If I go to other modules from the app store, the warning gets fired too. I see that others are formatting similarly to how it's been written. The vscode settings is set like this:
|
Just include the dictionary in the message = _(
"The cost must be greater than zero for [%(code)s] %(name)s.",
{
'code': product.default_code,
'name': product.name
}
) and it's better to use |
I have this code:
vscode always reports the warning W8301
Describe the bug
I don't know another way of writing the code that doesn't trigger the warning. I also don't want to disable the warning.
The text was updated successfully, but these errors were encountered: