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

Unable to import a class from sale package to stock package

By
vivek
on 5/9/13, 5:18 AM 918 views

Hi,

I have a one to many field in sale package and the relative class is there in sale package itself. I would like to use the same field in stock package. But unable to do that. This problem normally occurs when i want to use an existing class from a list of default packages in another default package, whereas if i create my own module this error doesn't occur. Do openerp restrict the usage like this? Kindly throw some light on this import regard.

0
Gustavo
On 5/9/13, 8:13 AM

Add the sale module to your stock module. You have to do that in the depends section of the __openerp__.py file

Thanks Gustavo, i've tried it the way you said and it's working fine. But the problem is that the dependent module will also be installed which will be unnecessary. Just for a re-use of a small piece of code should we install that module too in openerp. what does the import on top of the python file does? is it enough to put it there?

vivek
on 5/9/13, 9:24 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

0 follower(s)

Stats

Asked: 5/9/13, 5:18 AM
Seen: 918 times
Last updated: 3/16/15, 8:10 AM