OCA / pylint-odoo

Odoo plugin for Pylint
http://www.pylint.org
143 stars 168 forks source link

[IMP] new `deprecated-odoo-model-method` check #470

Closed antonag32 closed 1 year ago

antonag32 commented 1 year ago

This new check looks for model methods that have been deprecated and should not be overriden in model classes. It takes into account odoo versions and comes with sane defaults which can be replaced by a custom list in the configuration file.

Closes #469.

antonag32 commented 1 year ago

Marked as draft as I still need to write a unit test to verify the options work.

antonag32 commented 1 year ago

Also need to check the unittests...

antonag32 commented 1 year ago

I corrected it so that deprecated methods apply to <= versions. I also tested setting a dictionary on the rc file and it it seems like it is not supported, it is weirdly parsed as a list.

I personally don't see a problem with letting the option be a csv. As far as pre-commit-vauxoo goes, it should work with the defaults right?

antonag32 commented 1 year ago

@moylop260 The config file now accepts a dictionary and in fact for testing purposes I added a .pylintrc with it that should serve as an example for users.

moylop260 commented 1 year ago

Awesome!

👍