Skip to content

Commit

Permalink
Merge pull request #90 from vauxoo-dev/master-oca-fix-compute-none-moy
Browse files Browse the repository at this point in the history
[FIX] method-NAME: Fix case compute=None
  • Loading branch information
pedrobaeza committed Dec 8, 2016
2 parents 57fa5a7 + 6c21cfb commit 127f0cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pylint_odoo/checkers/no_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ def visit_call(self, node):
argument_aux = argument.value
if argument.arg in ['compute', 'search', 'inverse'] and \
isinstance(argument.value, astroid.Const) and \
not argument.value.value.startswith(
argument_aux.value and \
not argument_aux.value.startswith(
'_' + argument.arg + '_'):
self.add_message('method-' + argument.arg,
node=argument_aux)
Expand Down
1 change: 1 addition & 0 deletions pylint_odoo/test_repo/broken_module/models/broken_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class TestModel(models.Model):
search='my_method_search', # bad search method name
inverse='my_method_inverse', # bad inverse method name
)
compute_none = fields.Char(compute=None)

other_field2 = fields.char(
'Other Field2',
Expand Down

0 comments on commit 127f0cb

Please sign in to comment.