Odoo Help


4 Answers

Grover Menacho Bolivia

--Grover Menacho--
WebVision Enterprise Systems
| 7 8 10
La Paz, Bolivia
--Grover Menacho--

Odoo Developer

Grover Menacho Bolivia
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.
adam docherty Brazil
9/7/13, 9:04 PM

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 :(

johnCogitae France
9/8/13, 3:18 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/

adam docherty Brazil
9/8/13, 5:28 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!

johnCogitae France
9/9/13, 6:29 AM

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.

adam docherty Brazil
9/9/13, 10: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.

johnCogitae France
9/9/13, 11:34 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 ...

Ray Carnes United States
8/28/14, 12:15 PM

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.

Ideas constructivas del Noroeste S.A. de C.V. Mexico
8/28/14, 2:22 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


Ben Bernard Indonesia

--Ben Bernard--

| 4 3 9
Jakarta, Indonesia
--Ben Bernard--
Ben Bernard Indonesia
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

1 Comment
ajeeb India
10/21/14, 7:44 AM

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

Ing. Daniel Blanco Argentina
12/30/14, 7:39 PM

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

juan delgado Venezuela
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.
Ask a Question
Keep Informed
0 follower(s)
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