Launch offer
Business website $150 USD Custom plugin $200 USD Ready in 5 days
Get a quote
Odoo

Many2one Fields in Odoo

Link many records to one related record (foreign key style).

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')

Leave a reply

Your email address will not be published. Required fields are marked *