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.

1

Why some addons are loaded when server is started in a fresh database?

By
Atchuthan - Technical Consultant, Sodexis Inc
on 5/8/14, 6:49 AM 994 views

I created a new database "TEST" and have not installed any additional modules.

Then I opened my eclipse in DEBUG mode, and marked breakpoints at __init__.py files on following modules:

  1. product
  2. project
  3. hr
  4. account

Why does these addons are loaded even if the module is not Installed in my "TEST" database?

ANSWER:

The module was loaded due to a folder with "static" in the "product" module.

The OpenERP loads all addons from addons path containing static files and controllers. For more info: web/addons/web/http.py @ 566 line

Here, all the addons path that contains __openerp__.py and static folder are checked and loaded.

My Question

Why are the static folders loaded before starting OpenERP server??

1
shashank verma
On 5/9/14, 3:35 AM

Hello

For loading static stuffs , server doesn't need to be restarted. Example- if you make any changes in your js or css file in static folder, so without restarting your server your changes will be automatically reflected on your browser. Reason-files under static works as client side hence they are loaded automatically when your refresh page on browser. And if you making changes in python file then they act as server side hence u need to restart server and changes loaded when server restart.

Conclusion- Your static files loaded when browser page refresh and your py file loaded when openerp server restarted.

It is already in FALSE

Atchuthan - Technical Consultant, Sodexis Inc
on 5/9/14, 4:24 AM
0
Antonio M. Vigliotti
On 6/11/14, 9:24 AM

Module file __openerp__.py can contains some statements in order to auto load when new database i created. If I remember is auto_install or active.

You can see here my personal documentation

http://www.zeroincombenze.org/wiki/OpenERP/dev/7.0/tree/_openerp_.py

 

 

 

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/8/14, 6:49 AM
Seen: 994 times
Last updated: 7/10/15, 4:05 AM