Skip to content
Advertisement

Odoo14 – AttributeError: ‘tuple’ object has no attribute ‘cache'” while evaluating

I have a model in Odoo to register some logs(Log) and a helper class(Helper) with async function to receive some data ad register on Log, this _job_function is called by a Cron Job like this:

JavaScript

This is the helper class:

JavaScript

For debugging propuser i have override the create class, to check if i’m sending wrong data. When the job is executed and the create_log function is called, the program correctly enters the create function, I also checked the data sent in create, and I verified that they were correct, just like the one I keep when trying to create within the Odoo interface itself. the “create” button. But inside Odoo by the create button, create normally and by the create_log function I get this error:

JavaScript

Advertisement

Answer

As this is a threading problem, you need to make sure to create a new cursor.

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement