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

Adding a field to sale.order.line: which dependence should be specified in __openerp__.py?

By
E.M.
on 7/21/15, 5:19 PM 505 views

I am writting a custom module which extends functionality to sale.order.line model, specifically, it will add a field.

Which dependence package should be included in __openerp__.py and how should I look for it in the source code?

Thanks,

1

Dhinesh - Technical Consultant, Sodexis Inc

--Dhinesh - Technical Consultant, Sodexis Inc--
3577
| 5 4 9
Pondicherry, India
--Dhinesh - Technical Consultant, Sodexis Inc--

Passionate coder in Python/OpenERP. Knows Django/Flask MVC frameworks. Did code in Java, PHP.

Contact me at: dvdhinesh.mail@gmail.com

Dhinesh - Technical Consultant, Sodexis Inc
On 7/22/15, 2:05 AM

Basically you need to define the module where the sale.order.line model resides and that would be sale module. You need to add sale module as dependencies.

You need to add depends when Odoo modules which must be loaded before this one, either because this module uses features they create or because it alters resources they define.

When a module is installed, all of its dependencies are installed before it. Likewise dependencies are loaded before a module is loaded. For more manifest file

Which is the "right" way to reach the conclusion that sale.order.line model is in 'sale' module? Do you have to 'grep' for the class sale.order.line?

E.M.
on 7/22/15, 2:07 AM

You need to aware of the module name by yourself when developing new modules. There is no way around. Also grep will not help much since the same model can be inherited multiple times.

Dhinesh - Technical Consultant, Sodexis Inc
on 7/22/15, 4:42 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: 7/21/15, 5:19 PM
Seen: 505 times
Last updated: 7/22/15, 2:05 AM