Skip to Content
Menu
This question has been flagged
2 Replies
1079 Views

Hello all,

I got to work this morning and I;m trying to generate reports and this is the error that showed. I have rebooted the system and to no avail:

RPC_ERROR

Odoo Server Error

Traceback (most recent call last):
  File "/opt/odooerp/odoo/odoo/api.py", line 886, in get
    return field_cache[record._ids[0]]
KeyError: 272

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/odooerp/odoo/odoo/fields.py", line 1057, in __get__
    value = env.cache.get(record, self)
  File "/opt/odooerp/odoo/odoo/api.py", line 889, in get
    raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'ir.actions.act_window(272,).search_view'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odooerp/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/opt/odooerp/odoo/odoo/http.py", line 688, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odooerp/odoo/odoo/http.py", line 360, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odooerp/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odooerp/odoo/odoo/http.py", line 349, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odooerp/odoo/odoo/http.py", line 917, in __call__
    return self.method(*args, **kw)
  File "/opt/odooerp/odoo/odoo/http.py", line 536, in response_wrap
    response = f(*args, **kw)
  File "/opt/odooerp/odoo/addons/web/controllers/main.py", line 1620, in load
    action = request.env[action_type].sudo().browse([action_id]).read()
  File "/opt/odooerp/odoo/odoo/addons/base/models/ir_actions.py", line 251, in read
    result = super(IrActionsActWindow, self).read(fields, load=load)
  File "/opt/odooerp/odoo/odoo/models.py", line 3227, in read
    return self._read_format(fnames=fields, load=load)
  File "/opt/odooerp/odoo/odoo/models.py", line 3247, in _read_format
    vals[name] = convert(record[name], record, use_name_get)
  File "/opt/odooerp/odoo/odoo/models.py", line 5882, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/opt/odooerp/odoo/odoo/fields.py", line 1106, in __get__
    self.compute_value(recs)
  File "/opt/odooerp/odoo/odoo/fields.py", line 1265, in compute_value
    records._compute_field_value(self)
  File "/opt/odooerp/odoo/odoo/models.py", line 4256, in _compute_field_value
    getattr(self, field.compute)()
  File "/opt/odooerp/odoo/odoo/addons/base/models/ir_actions.py", line 218, in _compute_search_view
    fvg = self.env[act.res_model].fields_view_get(act.search_view_id.id, 'search')
  File "/opt/odooerp/odoo/odoo/api.py", line 540, in __getitem__
    return self.registry[model_name]._browse(self, (), ())
  File "/opt/odooerp/odoo/odoo/modules/registry.py", line 182, in __getitem__
    return self.models[model_name]
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odooerp/odoo/odoo/http.py", line 644, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odooerp/odoo/odoo/http.py", line 302, in _handle_exception
    raise exception.with_traceback(None) from new_cause
KeyError: 'account.report.general.ledger'


Kindly help out.

Emmanuel Ogboe

Avatar
Discard
Best Answer

check the following steps:

  1. Check Action Configuration: Review the configuration of the account.report.general.ledger action in your Odoo database. Ensure that all necessary fields, views, and dependencies are correctly defined.
  2. Verify Related Models: Make sure that all related models and fields referenced in the action are properly defined and accessible. This includes models such as ir.actions.act_window, ir.actions.report, ir.ui.view, and any custom models or fields involved in generating the general ledger report.
  3. Verify Access Rights: Check if the user executing the action has sufficient access rights to view and execute the account.report.general.ledger action and related resources. Ensure that the user has the necessary permissions on the accounting module and related objects.
  4. Check for Module Updates: If you recently updated or installed any modules related to accounting or reporting, ensure that they are compatible with your current Odoo version. Check for any updates or patches that may address compatibility issues or bugs.
  5. Review Logs: Examine the Odoo server logs for more detailed error messages or stack traces. Look for any specific error messages or exceptions that may provide additional clues about the root cause of the issue.
  6. Restart Services: Try restarting the Odoo server and related services to see if it resolves the problem. Sometimes, a simple restart can clear temporary issues or reload configurations.


Avatar
Discard
Best Answer

Hi,

The error message indicates that there's an issue with a specific record in your database, particularly related to an action window with the ID 272. Additionally, there's a KeyError related to the key 'account.report.general.ledger'.

Here are some steps you can take to troubleshoot and resolve this issue:

Check Data Consistency: Ensure that the record with the ID 272 exists and is correctly configured in your database. If it doesn't exist or if there are inconsistencies, you may need to manually correct or recreate the record.

Review Customizations: If you have made any customizations or modifications to the Odoo system, review them to see if they could be causing the issue. Sometimes, custom code or configurations can lead to unexpected errors.

Inspect Dependencies: Investigate any dependencies or related configurations, such as the account.report.general.ledger, to determine if they are properly set up and accessible.

Check Logs: Examine the Odoo server logs for any additional error messages or warnings that could provide more context about the issue. This can help pinpoint the root cause of the problem.


Hope it helps

Avatar
Discard