missing-return (W8110)#

A method calls super() but does not return anything.

What it does#

Reports methods that call super() but have no return.

Why is this bad?#

The value the parent method returns, such as the created records of create(), is lost for every caller.

Example#

def write(self, vals):
    super().write(vals)

Use instead:

def write(self, vals):
    return super().write(vals)

Configuration#

[tool.odoo-lint.rules.missing-return]
ignore-methods = ["__init__", "_register_hook", "setUp", "setUpClass", "tearDown", "tearDownClass"]

Fix safety#

Unsafe, when the method ends with a super() call: return is added before it, so callers get the parent’s return value.