Odoo Help

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 1,127 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

 

 

 

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

0 follower(s)

Stats

Asked: 5/8/14, 6:49 AM
Seen: 1127 times
Last updated: 7/10/15, 4:05 AM