Skip to Content
Menu
This question has been flagged
4 Replies
1977 Views

Hi,

I have odoo 8.0 running on ubuntu 16. I migrated it to a new server in the following order

1. I installed odoo 8.0 on the new server.

2. Restored the database to the new server.

3. Copied my custom addons to the new server.

4. Edited /etc/odoo/openerp-server.conf and added the path to my custom modules.

All goes well.  But when I login I receive the following error.

Odoo Server ErrorTraceback (most recent call last): File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 544, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 581, in dispatch result = self._call_function(**self.params) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 317, in _call_function return checked_call(self.db, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 118, in wrapper return f(dbname, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 314, in checked_call return self.endpoint(*a, **kw) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 810, in __call__ return self.method(*args, **kw) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 410, in response_wrap response = f(*args, **kw) File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 878, in load_needaction return request.session.model('ir.ui.menu').get_needaction_data(menu_ids, request.context) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 915, in proxy result = meth(cr, request.uid, *args, **kw) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 268, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_ui_menu.py", line 345, in get_needaction_data res[menu.id]['needaction_counter'] = obj._needaction_count(cr, uid, dom, context=context) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 268, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_needaction.py", line 64, in _needaction_count res = self.search(cr, uid, (domain or []) + dom, limit=100, order='id DESC', context=context) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 268, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 1650, in search return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 268, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4690, in _search query = self._where_calc(cr, user, args, context=context) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 268, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4501, in _where_calc e = expression.expression(cr, user, domain, self, context) File "/usr/lib/python2.7/dist-packages/openerp/osv/expression.py", line 662, in __init__ self.parse(cr, uid, context=context) File "/usr/lib/python2.7/dist-packages/openerp/osv/expression.py", line 830, in parse raise ValueError("Invalid field %r in leaf %r" % (left, str(leaf)))ValueError: Invalid field 'project_task_visibility' in leaf "<osv.ExtendedLeaf: ('project_task_visibility', '=', 'see_all_task'


Am I missing something?  Please help

Avatar
Discard

You can grep project_task_visibility.*field and restart your server with -u of this module ...

Are you sûre that you havé all your module in addons-path ?

Author

Thank you all, I solved the problem, it was a very very tiny thing: The Locale settings. I changed that and everything is now perfect.

Best Answer

Hi,

I think, when migrating to new server you should swap Step 2 & 3.  

Means, after installation, you should copy your custom addons and then restore the database.

So here, please try by restoring the DB again & then restart the server.

You may also check the addons in your custom addons folder are proper.

Avatar
Discard
Best Answer

Unless you code is from the exact same day, you need to upgrade the database when you move it to a server with newer code.

Example:

Your first server installs Odoo in November.

Your second server installs Odoo in December.

You take a backup from your first server and restore it on the second server.

In this case your code on the second server is newer, so you must upgrade the database.

(The order of 2 & 3 isn't important as long as you do the upgrade AFTER step 4)

Method 1 to upgrade:

  • From the command line, run Odoo with the command line option "-u all"

Method 2 to upgrade:

  • From the UI, find the module 'base' and upgrade it, which upgrades all other modules.

Avatar
Discard

From 8 to 8, there are no changes of schéma... so in theory, not required! But it doens't cost anything to try it :)

You are correct, but I have always been told this by Odoo and have found in practice it is - what if there is a single change in a single XML file that code depends on to work properly?

That should Never happen in theory... in the worst case you don't havé the fix, but it should continue to work with the old xml also !

Every day, i pull the last code, i never update the databases except if a néed à specific fix which oné is in xml , so i update just this module ...

Author Best Answer

Thanks Akhil

I did a fresh install but the problem persist.  My custom addons folder is at /opt/odoo/custom_addons.  Putting this path in the addons_path makes the system not work.  Removing the path, the system works again but without my modules.  I suspect something small is missing, any idea?

Avatar
Discard