Odoo Help


2 Answers

Bole Croatia


| 6 4 8
Zagreb | Karlovac, Croatia

there is only 10 kind of people the ones that understand binary ... and others

Bole Croatia
7/2/14, 4:44 AM

if you are asking for debug purposes.. probably the last installed will be triggered.. 
but that is bad practice and confusing code.. try to avoid it.. because if you install both modules you will probably get fields in your views shown twice wich is very bad... OE does not handle well if same field is shown twice on one view...
if you have two modules using(and needing)  the same attribute probably the best solution is to make third module which will contain that attribute (also methods and views for it) and the two original modules can depend on new one.. so you will avoid double adding fields..

1 Comment
Dhinesh India
7/2/14, 11:00 AM

I can handle the twice field issue by fields_view_get using lxml properties. But i want to know the module preferences. And no, it wont get triggered on the basis of installation while debugging.


René Schuster Germany

--René Schuster--
| 7 7 10
Weinheim, Germany
--René Schuster--

Challenge Everything!

René Schuster Germany
7/2/14, 2:46 AM

It depends on your your type of inheritance for your custom modules.

If both modules use class inheritance ( _inherit = 'parent.model', _name = 'parent.model'), the both fields will be exactly the same.

if you use prototype inheritance ( _inherit = 'parent.model', _name = 'new.name'), the database will contain different tables for your new custom modules. This will result in no conflict, since the fields (although they have the same name) are part of different database tables.


I'm not sure, which on_change method will be used in your case. Maybe the last installed module will determine it. Maybe the sequence/order of the views will play a role.

You should think about your design and maybe try to change the inheritance.

Why not using one custom module instead of two?
Or let module A inherit from Sales and module B from module A?



1 Comment
Dhinesh India
7/2/14, 3:27 AM

Okay. I forgot to add this. I use class inheritance (_inherit = 'parent.model', _name = 'parent.model') on both modules. Module A, Module B.

Ask a Question
Keep Informed
1 follower(s)
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