Skip to content

[ADD] string-method-name: Add string-method-name check to preserve inheritability #528

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

Merged
merged 1 commit into from
May 13, 2025

Conversation

moylop260
Copy link
Collaborator

@moylop260 moylop260 commented May 13, 2025

Bad

    name = fields.Char(
        compute=_compute_name,
        search=_search_name,
        inverse=_inverse_name,
    )

Good

    name = fields.Char(
        compute="_compute_name",
        search="_search_name",
        inverse="_inverse_name",
    )

Fix OCA/odoo-pre-commit-hooks#126

@moylop260 moylop260 self-assigned this May 13, 2025
…heritability

Bad

    name = fields.Char(
        compute=_compute_name,
        search=_search_name,
        inverse=_inverse_name,
    )

Good

    name = fields.Char(
        compute="_compute_name",
        search="_search_name",
        inverse="_inverse_name",
    )

Fix OCA/odoo-pre-commit-hooks#126
@moylop260 moylop260 force-pushed the string-method-moy branch from 7fd78de to f923b5c Compare May 13, 2025 17:15
@moylop260 moylop260 merged commit c9fbdfa into OCA:main May 13, 2025
21 checks passed
moylop260 added a commit to vauxoo-dev/pre-commit-vauxoo that referenced this pull request May 13, 2025
    Check release notes:
     - https://pypi.org/project/pylint-odoo/9.3.4

    [ADD] string-method-name: Add string-method-name check to preserve inheritability (OCA/pylint-odoo#528)
moylop260 added a commit to vauxoo-dev/pre-commit-vauxoo that referenced this pull request May 13, 2025
    Check release notes:
     - https://pypi.org/project/pylint-odoo/9.3.5

    [ADD] inheritable-method-string: Add check to preserve inheritability for compute, search and inverse,  (OCA/pylint-odoo#528)
    [ADD] inheritable-method-lambda: Add check to be inheritable the domain and default using lambda (OCA/pylint-odoo#529)
moylop260 added a commit to vauxoo-dev/pre-commit-vauxoo that referenced this pull request May 13, 2025
    Check release notes:
     - https://pypi.org/project/pylint-odoo/9.3.6

    [ADD] inheritable-method-string: Add check to preserve inheritability for compute, search and inverse,  (OCA/pylint-odoo#528)
    [ADD] inheritable-method-lambda: Add check to be inheritable the domain and default using lambda (OCA/pylint-odoo#529)
moylop260 added a commit to Vauxoo/pre-commit-vauxoo that referenced this pull request May 13, 2025
    Check release notes:
     - https://pypi.org/project/pylint-odoo/9.3.6

    [ADD] inheritable-method-string: Add check to preserve inheritability for compute, search and inverse,  (OCA/pylint-odoo#528)
    [ADD] inheritable-method-lambda: Add check to be inheritable the domain and default using lambda (OCA/pylint-odoo#529)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check to avoid harcoding methods in field definition
1 participant