Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Test API

Entity: test_new_api.compute.creator

Compute Method: _compute_created

View 18.0
Inputs Method Outputs
  • name
- model = self.env['test_new_api.compute.created']
- for record in self:
-             record.created_id = (
-                 model.search([('name', '=', record.name)], limit=1)
-                 or model.create({'name': record.name})
-             )
  • created_id

Back to entity