Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
11776 Zobrazení

Good morning to everyone, i am facing this problem:

Sometimes, after making modifications in my .py files, i restarted the server and saw nothing had changed. In fact the .pyc files were not regenerated so i want to know if someone can give me the good procedure to make that happens.

 

Now what I do is:

step1-add in eclipse params: --update=module_name

step2-click on settings ==> installed modules (the idea is to load the module again)

step3-be sure not to be in debug mode (you can remove debug from the address bar).

Could someone know how to do step 2 without using the web client (browser) i.e a way or a param to add when restarting the server so that the modules will be load again, because i remark that it is in this step that pyc files are regenerated.

Thank you in advance.

 

 

Avatar
Zrušit
Nejlepší odpověď

If after restart, it's still not loaded,
Double click on the __init__.py at the module directory and see if the file will be triggered

Avatar
Zrušit
Nejlepší odpověď

Step 1 is actually the same as step 2, they are just different methods to do that: 1) is from command line while 2) is "live" from web client. The problem of doing it "live" is exactly the one you are having: the python files are not re-read and bytecompiled so the changes to them won't work, you'll have to restart openerp-server. (there may be ways to force them to be reloaded without restarting the server, does anyone know?). But all other modifications (xml views, translations, etc) are loaded exatcly the same way when doing -u module from command line or module upgrade from web client.

TL;DR: restart openerp-server.

Avatar
Zrušit

There is a server developmant mode, when server restart and module upgrade is not needed.

To enable it start the server with option --dev=all

Related Posts Odpovědi Zobrazení Aktivita
1
led 21
3602
0
bře 15
4146
1
dub 25
1823
0
lis 18
2679
1
srp 17
5875