Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
4896 Lượt xem

hi everybody, i'm facing the following problem, using inheritance to update some classes belonging to the base module in order to add a column (in ‘res_partner inherited class, we have added the column ‘commune_id’ ) when i upgrade the module which calls the python file containing these updates i'm getting the error that the column ‘commune_id’ doesn’t exist blocking the connection to OpenERP 7.0. This error occurs when i connect to a database which doesn’t contain this field ( commune_id) and when i create an new database the error is not coming.

is there a commande line that i can update a specific module , or addons ?

Thanks in advance

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi, You can update specific module by command line with following option: -u module_name e.g. python openerp-server -u base

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Hi Nehal , i have done this commande ,for module base but i'v got this error , normally this error couldn't happen , i didn't do any change in this module so how can it be update with error?? in second: how can i exit from the last line ?

best regards

2014-03-05 20:23:07,425 4594 WARNING ? openerp.modules.module: module web_kanban                                                                                        : module not found
2014-03-05 20:23:07,426 4594 CRITICAL ? openerp.modules.module: Couldn't load mo                                                                                        dule web_kanban
2014-03-05 20:23:07,426 4594 CRITICAL ? openerp.modules.module: No module named                                                                                         web_kanban
2014-03-05 20:23:07,426 4594 ERROR ? openerp.service: Failed to load server-wide                                                                                         module `web_kanban`.
Traceback (most recent call last):
  File "/opt/openerp/v7/server/openerp/service/__init__.py", line 60, in load_se                                                                                        rver_wide_modules
    openerp.modules.module.load_openerp_module(m)
  File "/opt/openerp/v7/server/openerp/modules/module.py", line 405, in load_ope                                                                                        nerp_module
    __import__('openerp.addons.' + module_name)
  File "/opt/openerp/v7/server/openerp/modules/module.py", line 132, in load_mod                                                                                        ule
    f, path, descr = imp.find_module(module_part, ad_paths)
ImportError: No module named web_kanban
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/opt/openerp/v7/server/openerp/service/wsgi_server.py", line 436, in ser                                                                                        ve
    httpd = werkzeug.serving.make_server(interface, port, application, threaded=                                                                                        True)
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 399, in make                                                                                        _server
    passthrough_errors, ssl_context)
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 331, in __in                                                                                        it__
    HTTPServer.__init__(self, (host, int(port)), handler)
  File "/usr/lib/python2.7/SocketServer.py", line 408, in __init__
    self.server_bind()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/usr/lib/python2.7/SocketServer.py", line 419, in server_bind
    self.socket.bind(self.server_address)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 98] Adresse déjà utilisée

2014-03-05 20:23:07,433 4594 INFO ? openerp: OpenERP server is running, waiting                                                                                         for connections...
Ảnh đại diện
Huỷ bỏ

This error is due to running OpenERP server on the same port on which you are trying to update. As a solution, you may kill the process or can run openerp-server on different port. ps aux | grep openerp nehal 2790 0.4 1.4 145160 56264 pts/0 Sl+ 09:27 0:04 python ./openerp-server --addons-path=../addons/,../web/addons Above command will show you the detail of openerp-server running on which port. You can kill that specific process by running the command sudo kill -9 procees_id e.g in my case: sudo kill -9 2790