Odoo Help


must you really restart OpenErp all the time to develop a module?

adam docherty
on 9/7/13, 4:20 PM 9,773 views

I have just started developing for OpenERP, I come from a PHP background and I am amazed that you have to restart the server and wait like half a minute for all the modules to recompile after you make any changes...

This to me seems crazy.... in PHP you just make your change and refresh the browser, no waiting...

I am really quite depressed about this and I am wondering how you can possible get anything done in a reasonable amount of time while developing for OpenERP.

Please tell me I am missing something!

Grover Menacho
On 9/7/13, 6:19 PM

Well it depends...

I came from a PHP background too but developing in Python is quite easy. I don't know which OS you are using, I am working with Linux and this works perfectly, I am with Linux Mint + PyCharm + PgAdminIII and it's working great.

When you are modifying:

  • A python file: you have to restart the server to recompile the *.pyc files. When you are creating or modifying a function there's no need to reinstall the module, if you make changes on the object or the dependencies you have to reinstall the module.
  • A XML file: you can install it without restarting the server, but you have to reinstall the module.
  • A CSS file: you only have to refresh your browser.
  • A JS file: you only have to refresh your browser.

Thanks for your answer, I understand what you mean - but really if you are working in a complex python file is there no way to make it "automatically" compile as you make changes? Is there some kind of python IDE that would do this for you?

It seems really strange that there is this requirement with python being such a dynamic language. I hate to think of the time lost in development if you have to compile all the time...

Maybe I have just been spoilt by the convenience of PHP and now have to steal myself to work in the real world :(

adam docherty
on 9/7/13, 9:04 PM

Remember that Python is interpreted, the OpenERP server just read the code. You restart the server to reload the file in fact. You don't have to wait, stop, start and refresh your page. When I develop I use Eclise IDE. Here how to use python on eclipse and how to configure openerp. http://dipleo.fr/eclipse/

on 9/8/13, 3:18 PM

Thanks guys! As a developer new to Python / OpenERP, your expert advice is invaluable. I will give eclipse a go then. As mentioned before, my main concern is the "stop / start" issue and if I can overcome this it will really make my day. thanks again!

adam docherty
on 9/8/13, 5:28 PM

As Grover tell it, you have to restart your server when you modify python. a restart take 20 seconds maybe. It's juste to reload new python file. It's not because of Python, it's because of Openerp Server.

on 9/9/13, 6:29 AM

Is there no way to force OpenERP to reload the file during runtime? - 20 seconds adds up... and really it is horrible to think that you have to wait 20 seconds to see your changes come up. Anyway I am trying the eclipse route suggested before and hoping this will make things better.

adam docherty
on 9/9/13, 10:29 AM

What's the runtime ? you just have to stop and restart the server, if you have a good installation, you only do service openerp stop and service openerp start ! read here http://dipleo.fr/bonjour-tout-le-monde/ and here http://dipleo.fr/installer-openerp-rapidement/ Remember that in java world a compilation could take many hours ! Here it's only seconds ...

on 9/9/13, 11:34 AM

It should not take more than 2-4 seconds to restart the server. Create some sort of shell script alias (mine is called 'bump') so every time you need to stop and start the server you only have to type one word.

Bista Solutions US, Ray Carnes
on 8/28/14, 12:15 PM

yes i'm agree with Ray, it shouldn't take more than 5 seconds to restart the server unless your installation it's not ok or well configured

Ideas constructivas del Noroeste S.A. de C.V.
on 8/28/14, 2:22 PM
Ben Bernard
On 9/29/14, 9:56 PM

PyDev support auto reloading module for python project [1]. But, it's not working for Odoo project, at least I tried. One example of what makes Odoo slow at start-up is the mechanism of loading module. I think there's a development in echancing cache mechanism for this.

[1] http://pydev.org/manual_adv_debugger_auto_reload.html

You are right. XML files are loaded into Database. https://www.odoo.com/forum/help-1/question/editing-process-in-openerp-2418

on 10/21/14, 7:44 AM
Ing. Daniel Blanco
On 12/30/14, 7:39 PM

What if you cd to your addon directory and run "python -m compileall ." ?

juan delgado
On 9/29/14, 6:56 PM

hi please help in this case how i restar server in odoo (open erp 8) but take effects in my .pyc file, i make change in code and nothing happen

i use reboot and 

sudo su odoo

cd /opt/odoo/v8/server/

./openerp-server -c /etc/openerp-server.conf &

that is your solution but not working for me

  • A python file: you have to restart the server to recompile the *.pyc files. When you are creating or modifying a function there's no need to reinstall the module, if you make changes on the object or the dependencies you have to reinstall the module.

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.


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)


Asked: 9/7/13, 4:20 PM
Seen: 9773 times
Last updated: 3/16/15, 8:10 AM