Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
8226 มุมมอง

I have just inserted a new python code file into my custom addons folder, added the classes' name as import to __init__.py, restarted server, updated modules, updated this special custom module, too, but my changes are not applied to the system. Did I forget anything? What?

What I can not understand, is that this code runs perfectly inside my test environment, but after having ported it to productive environment, it is ignored completely. It is exactly the same code...

อวตาร
ละทิ้ง

You say that it's the same code, but it's not the same environment. What's the difference between the two environments ? Maybe you can find the response in your openerp-server.log file?

คำตอบที่ดีที่สุด
  • First, in __init__.py you should not add the class but the file name. (without .py extension)
  • try restarting the server with the option -u your_module_name
  • does you new module appear under settings / modules in the client? Otherwise: update module list
  • if it doesnt work yet: make sure your addon is in the addons path (you can (among other ways) use something like this --addons-path=<normal_addons>,<your addons folder>)
  • still not working? try to add a print line on the top of your new .py file and see if it is printed while starting the server

 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Please refer here: must you really restart OpenErp all the time to develop a module?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

try to delete the *.pyc files of your module and then restart the openerp/odoo server.

 

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มี.ค. 15
3144
0
มี.ค. 15
4661
0
มี.ค. 15
3017
0
ก.พ. 24
1785
2
ก.ค. 22
5513