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 dinamically specify domain in many2many field?

By
Ratmil Torres
on 8/26/14, 9:46 AM 796 views

I have set an on_change event for a field (field A) in order to dynamically set a domain in another field (field B). This works perfect except that when creating a new record, field A is already initialized (field A is many2one), the on_change function is not triggered, so field B domain is not set.

Is there an event raised when an insert form (or edit form) is shown?

1

Ivan

--Ivan--
3210
| 5 3 6
Jakarta, Indonesia
--Ivan--
Ivan
On 8/27/14, 5:34 AM

Even if field A has been initialized, when the form view of that record is opened in edit mode, the on_change will be triggered and domain will be set properly.  Maybe you can share snippets of your code so that the problem can be more clearly understood.

Yes, you are right. My code is ok.

Ratmil Torres
on 8/27/14, 8:37 AM

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: 8/26/14, 9:46 AM
Seen: 796 times
Last updated: 3/16/15, 8:10 AM