muk-it / muk_dms

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

ERROR_MuK Documents Attachment Wizard #42

Closed Pereiral01 closed 6 years ago

Pereiral01 commented 6 years ago

Hello, I bought MuK Documents Attachment Wizard, downloaded and Install (after MUK_DOCUMENTS), and when go to UPLOAD a new file in DOCUMENTS it give me a error.

If I uninstall MuK Documents Attachment Wizard, and go to UPLOAD a new file in DOCUMENTS it works fine, so I suppose its any problem with this APP.

Could you help me, please?

abr-19-2018 17-41-30

The error is: Error: Odoo Server Error

Traceback (most recent call last): File "/odoo/odoo-server/odoo/fields.py", line 936, in get value = record.env.cache.get(record, self) File "/odoo/odoo-server/odoo/api.py", line 960, in get value = self._data[field][record.id][key] KeyError: <odoo.api.Environment object at 0x7f55f4b26c18>

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/odoo/odoo-server/odoo/http.py", line 650, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/odoo/odoo-server/odoo/http.py", line 310, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/odoo/odoo-server/odoo/tools/pycompat.py", line 87, in reraise raise value File "/odoo/odoo-server/odoo/http.py", line 692, in dispatch result = self._call_function(self.params) File "/odoo/odoo-server/odoo/http.py", line 342, in _call_function return checked_call(self.db, *args, *kwargs) File "/odoo/odoo-server/odoo/service/model.py", line 97, in wrapper return f(dbname, args, kwargs) File "/odoo/odoo-server/odoo/http.py", line 335, in checked_call result = self.endpoint(*a, kw) File "/odoo/odoo-server/odoo/http.py", line 936, in call return self.method(*args, *kw) File "/odoo/odoo-server/odoo/http.py", line 515, in response_wrap response = f(args, kw) File "/odoo/odoo-server/addons/web/controllers/main.py", line 930, in call_kw return self._call_kw(model, method, args, kwargs) File "/odoo/odoo-server/addons/web/controllers/main.py", line 922, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/odoo/odoo-server/odoo/api.py", line 689, in call_kw return call_kw_multi(method, model, args, kwargs) File "/odoo/odoo-server/odoo/api.py", line 680, in call_kw_multi result = method(recs, *args, **kwargs) File "/odoo/odoo-server/addons/muk_dms/models/dms_base.py", line 143, in read result = super(DMSBaseModel, self).read(fields, load) File "/odoo/odoo-server/odoo/models.py", line 2576, in read values[name] = field.convert_to_read(record[name], record, use_name_get) File "/odoo/odoo-server/odoo/models.py", line 4729, in getitem return self._fields[key].get(self, type(self)) File "/odoo/odoo-server/odoo/fields.py", line 940, in get self.determine_value(record) File "/odoo/odoo-server/odoo/fields.py", line 1051, in determine_value self.compute_value(recs) File "/odoo/odoo-server/odoo/fields.py", line 1007, in compute_value self._compute_value(records) File "/odoo/odoo-server/odoo/fields.py", line 998, in _compute_value getattr(records, self.compute)() File "/odoo/odoo-server/addons/muk_dms_attachment_wizard/models/dms_file.py", line 94, in _compute_attachments_count record.attachments_count = len(record.attachments) AttributeError: 'muk_dms.file' object has no attribute 'attachments'

keshrath commented 6 years ago

Make sure you have the latest version of muk_dms and muk_dms_attachment installed. You may need to update the app and restart the server. If the error still exists, I will gladly forward your error to our support team.

Pereiral01 commented 6 years ago

Checked I have Installed: muk_dms 11.0.1.3.5 muk_dms_attachment 11.0.1.1.2

muk_dms_attachment_wizard 11.0.1.0.0

Server restart ... and the same error.

keshrath commented 6 years ago

AttributeError: 'muk_dms.file' object has no attribute 'attachments'

The error means that the attachments field does not exist. Either it didn't update the database correctly or we didn't increase the version of muk_attachment properly and you don't have the latest version.

Can you check if your local code is the same as on Github (https://github.com/muk-it/muk_dms/blob/11.0/muk_dms_attachment/models/dms_file.py)

Pereiral01 commented 6 years ago

I checked the code and Uploaded the module to version

I tried:

Many Thanks