コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3 返信
3416 ビュー

I have added a customized field to the res.partner model. I think I must have used an illegal character in the field name, as the browser now reports an error from all attempts to acces/view my databases. I am also unable to edit/fix anything via the browser. What can I do to fix this?

The server traceback:

Server Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 292, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 626, in dispatch res = fn(db, uid, *params) File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 190, in execute_kw return self.execute(db, uid, obj, method, *args, **kw or {}) File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 132, in wrapper return f(self, dbname, *args, **kwargs) File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 199, in execute res = self.execute_cr(cr, uid, obj, method, *args, **kw) File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 187, in execute_cr return getattr(object, method)(cr, uid, *args, **kw) File "/usr/lib/pymodules/python2.7/openerp/tools/cache.py", line 18, in lookup r = self.lookup(self2, cr, *args) File "/usr/lib/pymodules/python2.7/openerp/tools/cache.py", line 46, in lookup value = d[key] = self.method(self2, cr, *args) File "/usr/lib/pymodules/python2.7/openerp/addons/base/res/res_users.py", line 363, in context_get res = getattr(user,k) or False File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 499, in __getattr__ raise AttributeError(e) AttributeError: u'x_bem\xe6rk'

アバター
破棄
最善の回答

Steps to follow:

  • Stop the server
  • Fix the error/field
  • Restart the server using flags "-u all -d $your_db_name"

Should do the trick.

アバター
破棄

No need to update all modules (-u all), just update the changed one.

@Leonardo: That is true, but modules that depend on that module might be changed as well. In my experience a -u all can prevent some weird side-effects of partially loaded modules, but in theory you are absolutely right .

著作者 最善の回答

Thank you for the reply, but I am using a hosted solution so I do not see how I am able to stop/restart the servers. Any other ideas?

アバター
破棄

By server he meant openerp-server, not the physical machine.

最善の回答

If you have an error in your python code, Odoo will fail and never start, so the client won't be able to communciate with Odoo server, therefore you won't be able to do anything.

You have to fix the error and restart openerp-server with the -u <your_module> parameter to update the fixed module.

アバター
破棄