OCA / account-reconcile

Odoo account reconciliation modules (statements, data completion...)
https://odoo-community.org/psc-teams/banking-10
GNU Affero General Public License v3.0
143 stars 386 forks source link

Singleton traceback on account_reconcile_oca #639

Closed anajuaristi closed 1 month ago

anajuaristi commented 8 months ago

Module

The name of the module that has a bug. account_reconcile_oca

Describe the bug

Trying to reconcile more than one invoice from bank statement using foreigner currency, we obtain this singleton error.

Traceback (most recent call last): File "/opt/odoo/v16/core/odoo/api.py", line 984, in get cache_value = field_cache[record._ids[0]] KeyError: 433

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/odoo/v16/core/odoo/fields.py", line 1160, in get value = env.cache.get(record, self) File "/opt/odoo/v16/core/odoo/api.py", line 991, in get raise CacheMiss(record, field) odoo.exceptions.CacheMiss: 'account.bank.statement.line(433,).can_reconcile'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/odoo/v16/core/odoo/api.py", line 984, in get cache_value = field_cache[record._ids[0]] KeyError: 433

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/odoo/v16/core/odoo/fields.py", line 1160, in get value = env.cache.get(record, self) File "/opt/odoo/v16/core/odoo/api.py", line 991, in get raise CacheMiss(record, field) odoo.exceptions.CacheMiss: 'account.bank.statement.line(433,).reconcile_data_info'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/odoo/v16/core/odoo/http.py", line 1584, in _serve_db return service_model.retrying(self._serve_ir_http, self.env) File "/opt/odoo/v16/core/odoo/service/model.py", line 133, in retrying result = func() File "/opt/odoo/v16/core/odoo/http.py", line 1611, in _serve_ir_http response = self.dispatcher.dispatch(rule.endpoint, args) File "/opt/odoo/v16/core/odoo/http.py", line 1815, in dispatch result = self.request.registry['ir.http']._dispatch(endpoint) File "/opt/odoo/v16/core/addons/website/models/ir_http.py", line 237, in _dispatch response = super()._dispatch(endpoint) File "/opt/odoo/v16/core/odoo/addons/base/models/ir_http.py", line 154, in _dispatch result = endpoint(request.params) File "/opt/odoo/v16/core/odoo/http.py", line 697, in route_wrapper result = endpoint(self, *args, *params_ok) File "/opt/odoo/v16/core/addons/web/controllers/dataset.py", line 42, in call_kw return self._call_kw(model, method, args, kwargs) File "/opt/odoo/v16/core/addons/web/controllers/dataset.py", line 33, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/opt/odoo/v16/core/odoo/api.py", line 461, in call_kw result = _call_kw_multi(method, model, args, kwargs) File "/opt/odoo/v16/core/odoo/api.py", line 448, in _call_kw_multi result = method(recs, args, kwargs) File "/opt/odoo/v16/core/odoo/models.py", line 2986, in read return self._read_format(fnames=fields, load=load) File "/opt/odoo/v16/core/odoo/models.py", line 3165, in _read_format vals[name] = convert(record[name], record, use_name_get) File "/opt/odoo/v16/core/odoo/models.py", line 5898, in getitem return self._fields[key].get(self, type(self)) File "/opt/odoo/v16/core/odoo/fields.py", line 1209, in get self.compute_value(recs) File "/opt/odoo/v16/core/odoo/fields.py", line 1387, in compute_value records._compute_field_value(self) File "/opt/odoo/v16/core/odoo/models.py", line 4222, in _compute_field_value fields.determine(field.compute, self) File "/opt/odoo/v16/core/odoo/fields.py", line 100, in determine return needle(records, args) File "/opt/odoo/v16/core/addons/base_sparse_field/models/fields.py", line 52, in _compute_sparse values = record[self.sparse] File "/opt/odoo/v16/core/odoo/models.py", line 5898, in getitem return self._fields[key].get(self, type(self)) File "/opt/odoo/v16/core/odoo/fields.py", line 1209, in get self.compute_value(recs) File "/opt/odoo/v16/core/odoo/fields.py", line 1387, in compute_value records._compute_field_value(self) File "/opt/odoo/v16/core/odoo/models.py", line 4222, in _compute_field_value fields.determine(field.compute, self) File "/opt/odoo/v16/core/odoo/fields.py", line 97, in determine return needle(args) File "/opt/odoo/v16/github/oca/account-reconcile/account_reconcile_oca/models/account_bank_statement_line.py", line 336, in _compute_reconcile_data_info record.reconcile_data_info = record._default_reconcile_data( File "/opt/odoo/v16/github/oca/account-reconcile/account_reconcile_oca/models/account_bank_statement_line.py", line 474, in _default_reconcile_data

The above server error caused the following client error: null

To Reproduce

Affected versions: V16

Steps to reproduce the behavior:

  1. Reconcile from bank statement. One line with several invoices. Foreigner currency.

Expected behavior No traceback

@etobella

github-actions[bot] commented 2 months ago

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.