[REF] test_lint: check overwrites of create()

Fix some examples to match the method definition of Model.create().

closes odoo/documentation#12527

Related: odoo/odoo#202106
Related: odoo/enterprise#81599
Signed-off-by: Krzysztof Magusiak (krma) <krma@odoo.com>
This commit is contained in:
Krzysztof Magusiak (krma)
2025-02-03 10:13:24 +00:00
parent 8db2fbcc1d
commit ae9030b6d6
3 changed files with 13 additions and 11 deletions

View File

@@ -59,11 +59,11 @@ specific business logic::
...
@api.model
def create(self, vals):
def create(self, vals_list):
# Do some business logic, modify vals...
...
# Then call super to execute the parent method
return super().create(vals)
return super().create(vals_list)
The decorator :func:`~odoo.api.model` is necessary for the :meth:`~odoo.models.Model.create`
method because the content of the recordset ``self`` is not relevant in the context of creation,