I have a many2many field and in some cases, that field should only have 1 line. I don't want to create a separate field for that condition since i'll be using it to my other modules. So how can i restrict user to add another line if they already selected 1?
this doesn't work:
Thank you!
You always can put a domain for your conditions,
field_m2o = FIelds.Many2one('my.model',domain=[('your_condition','=',value')])