OCA / knowledge

Odoo Document & Knowledge Management
http://www.odoo-community.org/project/22
GNU Affero General Public License v3.0
159 stars 332 forks source link

Error message when installing module document_page #109

Closed wim-a closed 7 years ago

wim-a commented 8 years ago

module: document_page version: 9.0

Hello,

I’m trying to install the module document_page on Odoo 9 Enterprise Edition, and I get the following error message.

Traceback (most recent call last):
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/http.py", line 648, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/http.py", line 685, in dispatch
    result = self._call_function(*_self.params)
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/http.py", line 321, in _call_function
    return checked_call(self.db, *args, *_kwargs)
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/service/model.py", line 118, in wrapper
    return f(dbname, _args, *_kwargs)
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/http.py", line 314, in checked_call
    result = self.endpoint(_a, *_kw)
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/http.py", line 964, in __call__
    return self.method(_args, *_kw)
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/http.py", line 514, in response_wrap
    response = f(_args, *_kw)
  File "/home/odoo/odoo9_enterprise_new/odoo9/enterprise/web/controllers/main.py", line 907, in call_button
    action = self._call_kw(model, method, args, {})
  File "/home/odoo/odoo9_enterprise_new/odoo9/enterprise/web/controllers/main.py", line 895, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/api.py", line 250, in wrapper
    return old_api(self, _args, *_kwargs)
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/addons/base/module/module.py", line 459, in button_immediate_install
    return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/api.py", line 250, in wrapper
    return old_api(self, _args, *_kwargs)
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/addons/base/module/module.py", line 534, in _button_immediate_function
    registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/modules/registry.py", line 386, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/modules/loading.py", line 338, in load_modules
    loaded_modules, update_module)
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/modules/loading.py", line 237, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/modules/loading.py", line 137, in load_module_graph
    init_module_models(cr, package.name, models)
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/modules/module.py", line 300, in init_module_models
    result = obj._auto_init(cr, {'module': module_name})
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/api.py", line 250, in wrapper
    return old_api(self, _args, *_kwargs)
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/models.py", line 2666, in _auto_init
    cr.execute('CREATE INDEX "%s_%s_index" ON "%s" ("%s")' % (self._table, k, self._table, k))
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/sql_db.py", line 141, in wrapper
    return f(self, _args, *_kwargs)
  File "/home/odoo/odoo9_enterprise_new/odoo9/openerp/sql_db.py", line 220, in execute
    res = self._obj.execute(query, params)
ProgrammingError: relation "document_page_history_summary_index" already exists

Any idea how I can solve this?

Thanks a lot for your help.

Best regards,

Wim

max3903 commented 7 years ago

Hi @wim-a

Can you try deleting the index mentioned and re-install the module?

wim-a commented 7 years ago

Hello Maxime,

The only way that I could install the module is by changing the file document_page_history.py, and removing "select=True" from the definition of the summary field.

Before doing that, I checked my data base for finding the index document_page_history_summary_index, but I could find this index on the table document_page_history.

When installing it on an new created data base, it worked fine.

Best regards,

Wim

max3903 commented 7 years ago

@wim-a Did it work fine after or before removing select=True?

wim-a commented 7 years ago

Maxime,

It worked fine after removing select = True.

Best regards,

Wim

max3903 commented 7 years ago

@wim-a Your problem seems to be related to your database. Not sure the pull request will really fix this issue. At least, we are not using the obsolete select any more...