Skip to Content
Menu
This question has been flagged
4 Replies
6599 Zobrazenia

I am developping a new module in Odoo for one of my customer. I am using Windows and intend to port eventually that module on a Windows server.

In the development process, I have to frequently rewritre or add python code to my module.Whenever I do so, in order to upgrade my module, I have to: uninstall my module, delete it, erase it from the addons directory, stop and start the Odoo service, copy back my module in the addons directory, have Odoo upgrade its modules list, reinstall it. Every time I do so, I loose my Odoo objects (and the corresponding tables in the database) and the data. If I do not follow that path, I get unrecoverable errors whenever I try to "upgrade" the module through the Odoo button and have to do those steps anyways to recover my Odoo installation.

Not only is that time consuming, but it is also unthinkable in an eventual real installation. There must surely be another way.

Could someone help me?

Avatar
Zrušiť
Autor

Thanks Michael for the reference. I am already using Eclipse. I will try to configure it exactly like it is suggested in the guide.

what unrecoverable errors occur?

Autor

Traceback (most recent call last): File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\.\openerp\http.py", line 499, in _handle_exception File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\.\openerp\http.py", line 516, in dispatch File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\.\openerp\http.py", line 282, in _call_function File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\.\openerp\service\model.py", line 113, in wrapper File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\.\openerp\http.py", line 279, in checked_call File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\.\openerp\http.py", line 732, in __call__ File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\.\openerp\http.py", line 375, in response_wrap File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\openerp\addons\web\controllers\main.py", line 1244, in load File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\.\openerp\http.py", line 834, in proxy File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\.\openerp\api.py", line 237, in wrapper File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\openerp\addons\base\ir\ir_actions.py", line 321, in read File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\.\openerp\api.py", line 237, in wrapper File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\.\openerp\models.py", line 3095, in read File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\.\openerp\api.py", line 235, in wrapper File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\.\openerp\models.py", line 3127, in read File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\.\openerp\api.py", line 235, in wrapper File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\.\openerp\models.py", line 3289, in _read_from_database File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\.\openerp\osv\fields.py", line 1308, in get File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\openerp\addons\base\ir\ir_actions.py", line 260, in _search_view File "C:\Program Files (x86)\Odoo 8.0-20140918-103809\server\.\openerp\modules\registry.py", line 100, in __getitem__ KeyError: u'sprim.lien'

Sorry, no idea. Paste to pastebin, maybe?

Best Answer

Have you been doing your development work in Eclipse (with the PyDev pluggin)? 
Here is a complete guide to Odoo development under Windows: https://www.odoo.com/forum/help-1/question/how-to-debug-odoo-in-eclipse-under-winows-36105

I am not an expert on the upgrade process so all I can do is speculate that Update is primarily an additive process. You should be able to modify the contents of a function, XML file etc, but can't go as far as to remove table fields, classes, or functions as part of an update.

Avatar
Zrušiť
Best Answer

Did you by any chance create a record in your old module and then remove it in the new module without any delete directive?

Avatar
Zrušiť
Best Answer

How do you stop and start your odoo service? I believe you don't need to reinstall everything, just restart odoo and upgrade your module. I use Notepad++ and copy(replace) my files to addon folder in server then I restart the server using C:\Program Files (x86)\Odoo 8.0-20140918-103809\service\start.bat and upgrade my module using upgrade button (not delete and install again) and it works just fine.

Avatar
Zrušiť
Autor

Hi. I was starting and stopping Odoo service through services.msc. I guess I was wrong. I will try it your way...

Autor

I have stopped and started the Odoo service your way. Still get a lot of errors

Best Answer

Did you find a better way to upgrade in windows?

Avatar
Zrušiť