-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
[ADD] attribute-string-redundant: Check if the string parameter is eq… #100
[ADD] attribute-string-redundant: Check if the string parameter is eq… #100
Conversation
…ual to variable name
Hey @JesusZapata, thank you for your Pull Request. It looks like some users haven't signed our Contributor License Agreement, yet.
Appreciation of efforts, |
Please update this pr with last changes and fixes |
617cb2a
to
a8a0dc3
Compare
@moylop260 |
Sorry new conflicts |
@moylop260 |
@lasley @pedrobaeza @dreispt @lmignon |
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 ❤️ it!
It will be nice to be able to remove this from the mental checklist of things to look for during PR reviews - it's a common mistake too, particularly from older code.
Hey @JesusZapata, Appreciation of efforts, |
Check if the name of the variable is equal to string parameter
Tested cases
name_equal_to_string = fields.Float("Name equal to string") # Show warning
many_2_one = fields.Many2one('res.users', "Many 2 one") # Show warning
many_2_many = fields.Many2many('res.users', 'relation', 'fk_column_from', 'fk_column_to', "Many 2 many") # Show warning
This change is supported by CONTRIBUTING guide of oca
https://github.com/OCA/maintainer-tools/blob/master/CONTRIBUTING.md#fields