upgrade-api-model-create (U1903)#
create is decorated with @api.model, which makes it a batch create in Odoo 19.0.
Applies to Odoo 19.0 and later.
What it does#
Reports create methods decorated with @api.model.
Why is this bad?#
Since Odoo 19.0, @api.model on create wraps it as @api.model_create_multi:
the argument is a list of dicts. Code that treats it as one dict
(vals.get(...), vals["x"] = ...) breaks at runtime.
Use @api.model_create_multi and loop over vals_list.