@api.model in Odoo — a practical guide to Odoo @api.model with clear examples you can reuse in real projects.
Odoo Tutorial Series (62/112). Prefer one article? Read the complete Odoo tutorial.
Short description
Typical for helpers called without browsing specific records.
@api.model
@api.model
def default_get(self, fields_list):
res = super().default_get(fields_list)
res['state'] = 'draft'
return res