Odoo Help

Welcome!

This community 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.

0

How to update System correctly after having added new Python Code File?

By
NSC
on 3/19/14, 2:48 PM 1,081 views

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?

Med Said BARA
on 3/19/14, 8:53 PM
0

Grover Menacho

--Grover Menacho--
2523
| 5 7 8
La Paz, Bolivia
--Grover Menacho--

Systems Engineer + MBA

Grover Menacho
On 8/28/14, 12:01 PM
0

Stefan Reisich

--Stefan Reisich--
831
| 7 7 8
Pfungstadt, Germany
--Stefan Reisich--
Stefan Reisich
On 8/28/14, 10:24 AM

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

 

0
Hannes Smit
On 8/28/14, 9:36 AM
  • 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

 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 3/19/14, 2:48 PM
Seen: 1081 times
Last updated: 3/16/15, 8:10 AM