Odoo Help

Welcome!

This community 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.

0

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

By
vadivel
on 10/14/16, 12:17 AM 154 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.

Hi,

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?

Chandni
on 10/14/16, 6:52 AM
0
Hengky Zhang
On 10/14/16, 3:40 AM

you can use on_change method

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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