Odoo Help

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 559 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--
3617
| 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

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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 7/21/15, 5:19 PM
Seen: 559 times
Last updated: 7/22/15, 2:05 AM