Many2one Fields in Odoo — a practical guide to Odoo Many2one with clear examples you can reuse in real projects.
Odoo Tutorial Series (21/112). Prefer one article? Read the complete Odoo tutorial.
Short description
Use ondelete and domain to keep relations clean and filtered.
Many2one
partner_id = fields.Many2one('res.partner', string='Customer', ondelete='restrict')