Odoo Help


How to restrict selection of same record for second time(many2one field) in one2many?

on 10/14/16, 12:17 AM 528 views

Hi All,

Here i need a solution for some restriction.I have an object called base.modules(fields are name, technical name,product_id).In opportunity i will display one2many with this field. If base.modules table has 2 records like Record1, Record2, I have selected Record1 and again i dont allow to select same record on that form, but i can allow it in another form(another ID). How to restrict.Please give me solution.

Thanks in advance.


In second form means? Are you working with wizard or you u want only one product in one record.

You can make that product inactive, once its selected, this is the one way to do so.

Or elaborate how you want and how is your code?

on 10/14/16, 6:52 AM
On 10/14/16, 3:40 AM

you can use on_change method

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 10/14/16, 12:17 AM
Seen: 528 times
Last updated: 3/5/17, 1:40 AM