muk-it / muk_dms

MuK Document Management System
GNU Lesser General Public License v3.0
91 stars 143 forks source link

bug in muk_dms_attachment #41

Closed satriani-vai closed 6 years ago

satriani-vai commented 6 years ago

https://github.com/muk-it/muk_dms/commit/60f94ae23599bc621ed1e5095e8f117b1401c04a#diff-c35fb88e4224c19079d9ca14d78818ad

Fehler Kontext:
Ansicht `k. A.`
[view_id: k. A., xml_id: k. A., model: k. A., parent_id: k. A.]
2018-04-18 08:31:06,161 29043 ERROR bce_11_test odoo.http: Exception during JSON request handling.
Traceback (most recent call last):
  File "/usr/local/odoo_11/odoo/http.py", line 650, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/local/odoo_11/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/usr/local/odoo_11/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/usr/local/odoo_11/odoo/http.py", line 692, in dispatch
    result = self._call_function(**self.params)
  File "/usr/local/odoo_11/odoo/http.py", line 342, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/local/odoo_11/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/local/odoo_11/odoo/http.py", line 335, in checked_call
    result = self.endpoint(*a, **kw)
  File "/usr/local/odoo_11/odoo/http.py", line 936, in __call__
    return self.method(*args, **kw)
  File "/usr/local/odoo_11/odoo/http.py", line 515, in response_wrap
    response = f(*args, **kw)
  File "/usr/local/odoo_11/addons/web/controllers/main.py", line 930, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/usr/local/odoo_11/addons/web/controllers/main.py", line 922, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/usr/local/odoo_11/odoo/api.py", line 687, in call_kw
    return call_kw_model(method, model, args, kwargs)
  File "/usr/local/odoo_11/odoo/api.py", line 672, in call_kw_model
    result = method(recs, *args, **kwargs)
  File "/usr/local/odoo_11/odoo/models.py", line 1292, in load_views
    for [v_id, v_type] in views
  File "/usr/local/odoo_11/odoo/models.py", line 1292, in <dictcomp>
    for [v_id, v_type] in views
  File "/usr/local/odoo_11/odoo/addons/base/res/res_config.py", line 390, in fields_view_get
    toolbar=toolbar, submenu=submenu)
  File "/usr/local/odoo_11/odoo/models.py", line 1378, in fields_view_get
    xarch, xfields = View.postprocess_and_fields(self._name, etree.fromstring(result['arch']), view_id)
  File "/usr/local/odoo_11/odoo/addons/base/ir/ir_ui_view.py", line 1042, in postprocess_and_fields
    self.raise_view_error(message, view_id)
  File "/usr/local/odoo_11/odoo/addons/base/ir/ir_ui_view.py", line 503, in raise_view_error
    raise ValueError(message)
ValueError: Das Feld `attachment_location` existiert nicht
keshrath commented 6 years ago

Make sure you have the current version of muk_dms and muk_dms_attachment. In case that doesn't solve your problem. When exactly does it occur?

satriani-vai commented 6 years ago

Ich habe alle Module aus einem Paket (muk_dms_attachment-11.0.1.2.2.zip) ausgepackt. Ich gehe davon aus, dass man dabei die richtige Versioning beachtet :)

keshrath commented 6 years ago

Das Feld attachment_location sollte sich in res_config befinden: https://github.com/muk-it/muk_dms/blob/11.0/muk_dms_attachment/models/res_config.py

Prüfe ob dein Code dem von Github entspricht und ob das Feld in der Datenbank existiert. Es kann sein dass du den Server neu starten musst nachdem sich der Python Code geändert hat.

satriani-vai commented 6 years ago

Habe alle Module aus dem muk_dms_attachment-11.0.1.2.2.zip ausgepackt bzw ersetzt, nun kommt es zum

Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Logausschnitt

ERROR bce_11_test odoo.sql_db: bad query: b'SELECT "ir_attachment"."id" as "id","ir_attachment"."datas_fname" as "datas_fname","ir_attachment"."write_uid" as "write_uid","ir_attachment"."store_fname" as "store_fname","ir_attachment"."is_document" as "is_document","ir_attachment"."res_id" as "res_id","ir_attachment"."res_name" as "res_name","ir_attachment"."description" as "description","ir_attachment"."checksum" as "checksum","ir_attachment"."create_uid" as "create_uid","ir_attachment"."create_date" as "create_date","ir_attachment"."res_model" as "res_model","ir_attachment"."type" as "type","ir_attachment"."mimetype" as "mimetype","ir_attachment"."company_id" as "company_id","ir_attachment"."write_date" as "write_date","ir_attachment"."public" as "public","ir_attachment"."res_field" as "res_field","ir_attachment"."file_size" as "file_size","ir_attachment"."store_document" as "store_document","ir_attachment"."url" as "url","ir_attachment"."name" as "name","ir_attachment"."access_token" as "access_token" FROM "ir_attachment" WHERE "ir_attachment".id IN (420, 421, 422, 519, 296, 294, 523, 524, 237, 236, 535, 408, 826, 349, 830, 2143)'
ERROR: column ir_attachment.is_document does not exist
LINE 1: ...d","ir_attachment"."store_fname" as "store_fname","ir_attach...
keshrath commented 6 years ago

Offenbar hat Odoo deine Datenbank nicht angepasst: column ir_attachment.is_document does not exist Kannst versuchen den Server neu zu starten und anschließend die Module abzudaten. Falls das nichts hilft müsstest du es händisch in der Datenbank ändern oder für den Fall das es sich um eine Testdatenbank handelt die Datenbank neu erstellen.