Custom module is not getting installed - odoo

I am using openERP 8 (odoo) and I have odoo installed here
/opt/odoo
Then the module for erp is installed here
/opt/odoo/addons/opencart_erp_connector
/opt/odoo/addons/opencart_openerp_stock
When I go to update the list from
Update Module List
I get this
Odoo
Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo/openerp/http.py", line 517, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/openerp/http.py", line 538, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/openerp/http.py", line 294, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/openerp/http.py", line 291, in checked_call
return self.endpoint(*a, **kw)
File "/opt/odoo/openerp/http.py", line 754, in __call__
return self.method(*args, **kw)
File "/opt/odoo/openerp/http.py", line 387, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/addons/web/controllers/main.py", line 953, in call_button
action = self._call_kw(model, method, args, {})
File "/opt/odoo/addons/web/controllers/main.py", line 941, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/opt/odoo/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/api.py", line 391, in old_api
result = new_api(recs, *args, **kwargs)
File "/opt/odoo/openerp/api.py", line 395, in new_api
result = [method(rec, *args, **kwargs) for rec in self]
File "/opt/odoo/openerp/addons/base/module/wizard/base_module_update.py", line 15, in update_module
self.updated, self.added = self.env['ir.module.module'].update_list()
File "/opt/odoo/openerp/api.py", line 235, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/openerp/api.py", line 464, in new_api
result = method(self._model, cr, uid, *args, **kwargs)
File "/opt/odoo/openerp/addons/base/module/module.py", line 654, in update_list
handler.load_addons()
File "/opt/odoo/openerp/http.py", line 1254, in load_addons
m = __import__('openerp.addons.' + module)
File "/opt/odoo/openerp/modules/module.py", line 77, in load_module
mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
File "/opt/odoo/addons/opencart_erp_connector/__init__.py", line 21, in <module>
import core_updated_files
File "/opt/odoo/addons/opencart_erp_connector/core_updated_files.py", line 23, in <module>
import pooler
ImportError: No module named pooler
Will appreciate any help
thanks

The problem is in this .py file
/opt/odoo/addons/opencart_erp_connector/core_updated_files.py
Now go to above path (line no 23) and change the import statement
import pooler
to
from openerp import pooler
Restart server and refresh the browser.
Hope this will solve your problem.

Okay, Please do a small change in account_test.py, add import file from from openerp import pooler. Save and restart the server.

What is the filestructure of your custom module?
Can you provide us the filenames and some code?
it should be something like:
__init__.py
__pooler__.py
pooler.py
The __init__.py should contain:
import pooler

Related

Error while trying to install app on odoo 15

This is the error message I get when I try to install the app
This is the error message I get when I try to install the app
Traceback (most recent call last):
File "/opt/odoo15/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/opt/odoo15/odoo/odoo/http.py", line 687, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo15/odoo/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo15/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo15/odoo/odoo/http.py", line 348, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo15/odoo/odoo/http.py", line 916, in __call__
return self.method(*args, **kw)
File "/opt/odoo15/odoo/odoo/http.py", line 535, in response_wrap
response = f(*args, **kw)
File "/opt/odoo15/odoo/addons/web/controllers/main.py", line 1346, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/opt/odoo15/odoo/addons/web/controllers/main.py", line 1334, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo15/odoo/odoo/api.py", line 464, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo15/odoo/odoo/api.py", line 451, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-74>", line 2, in button_immediate_install
File "/opt/odoo15/odoo/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
return method(self, *args, **kwargs)
File "/opt/odoo15/odoo/odoo/addons/base/models/ir_module.py", line 486, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/opt/odoo15/odoo/odoo/addons/base/models/ir_module.py", line 603, in _button_immediate_function
registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/opt/odoo15/odoo/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/opt/odoo15/odoo/odoo/modules/loading.py", line 474, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/opt/odoo15/odoo/odoo/modules/loading.py", line 363, in load_marked_modules
loaded, processed = load_module_graph(
File "/opt/odoo15/odoo/odoo/modules/loading.py", line 179, in load_module_graph
load_openerp_module(package.name)
File "/opt/odoo15/odoo/odoo/modules/module.py", line 396, in load_openerp_module
__import__('odoo.addons.' + module_name)
File "/opt/odoo15/odoo/addons/pragtech_whatsapp_base/__init__.py", line 3, in <module>
from . import controller
File "/opt/odoo15/odoo/addons/pragtech_whatsapp_base/controller/__init__.py", line 1, in <module>
from . import main
File "/opt/odoo15/odoo/addons/pragtech_whatsapp_base/controller/main.py", line 5, in <module>
import phonenumbers
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/odoo15/odoo/odoo/http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo15/odoo/odoo/http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
ModuleNotFoundError: No module named 'phonenumbers'
I tried to install a terminal app on Odoo and it showed me this error
This is the error message I get when I try to install the app
This is the error message I get when I try to install the app
This is the error message I get when I try to install the app
The module uses phonenumbers to sanitize country mobile.
Installing the phonenumbers should fix that error:
pip install phonenumbers

odoo IndexError: list index out of range

Any ideas on the following odoo error? I Installed the Accounting module and instead of modifying the default Sales and Purchase Taxes entries ODOO created, made my own and deleted theirs. This error started happening when I try accessing different parts of the accounting module. I could try to reinstall the module but have had bad experiences with that.
Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo-9.0.20160620-2/apps/odoo/lib/odoo-9.0rc20160620-py2.7.egg/openerp/http.py", line 646, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo-9.0.20160620-2/apps/odoo/lib/odoo-9.0rc20160620-py2.7.egg/openerp/http.py", line 683, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo-9.0.20160620-2/apps/odoo/lib/odoo-9.0rc20160620-py2.7.egg/openerp/http.py", line 319, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo-9.0.20160620-2/apps/odoo/lib/odoo-9.0rc20160620-py2.7.egg/openerp/service/model.py", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo-9.0.20160620-2/apps/odoo/lib/odoo-9.0rc20160620-py2.7.egg/openerp/http.py", line 312, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo-9.0.20160620-2/apps/odoo/lib/odoo-9.0rc20160620-py2.7.egg/openerp/http.py", line 962, in __call__
return self.method(*args, **kw)
File "/opt/odoo-9.0.20160620-2/apps/odoo/lib/odoo-9.0rc20160620-py2.7.egg/openerp/http.py", line 512, in response_wrap
response = f(*args, **kw)
File "/opt/odoo-9.0.20160620-2/apps/odoo/lib/odoo-9.0rc20160620-py2.7.egg/openerp/addons/web/controllers/main.py", line 897, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo-9.0.20160620-2/apps/odoo/lib/odoo-9.0rc20160620-py2.7.egg/openerp/addons/web/controllers/main.py", line 889, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/opt/odoo-9.0.20160620-2/apps/odoo/lib/odoo-9.0rc20160620-py2.7.egg/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo-9.0.20160620-2/apps/odoo/lib/odoo-9.0rc20160620-py2.7.egg/openerp/api.py", line 381, in old_api
result = method(recs, *args, **kwargs)
File "/opt/odoo-9.0.20160620-2/apps/odoo/lib/odoo-9.0rc20160620-py2.7.egg/openerp/models.py", line 6054, in onchange
record._onchange_eval(name, field_onchange[name], result)
File "/opt/odoo-9.0.20160620-2/apps/odoo/lib/odoo-9.0rc20160620-py2.7.egg/openerp/models.py", line 5911, in _onchange_eval
method_res = method(self)
File "/opt/odoo-9.0.20160620-2/apps/odoo/lib/odoo-9.0rc20160620-py2.7.egg/openerp/addons/account/models/res_config.py", line 169, in onchange_company_id
self.default_sale_tax_id = isinstance(taxes_id, list) and taxes_id[0] or taxes_id
IndexError: list index out of range
This was a bug that was fixed on commit 1d843884e861252e395e0818b0fbf8aa074cd9d2.
Do a git pull on your branch to update your server files,restart the server and try again.
The problem is that in "res_config.py" you have a list you work with the first element is probably empty
To avoid this problem, you can use taxes_id[0] inside if taxes_id:

Odoo Server Error when try to access to accounting app

I'm using odoo 9 on my local debian jessie server. I installed without demo data, and installed basic apps (like accounting, sales, crm, others)
After installation and I configured odoo as non root user all was OK.
I was see the options available, and can access to accounting app but when I restarted my computer and start odoo server again and try to open accounting app I get the errors bellow.
Anyone know how can I resolve that?
Thanks!
Odoo Server Error
Traceback (most recent call last):
File "/home/user1/no_root/odoo-9/openerp/http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/user1/no_root/odoo-9/openerp/http.py", line 680, in dispatch
result = self._call_function(**self.params)
File "/home/user1/no_root/odoo-9/openerp/http.py", line 316, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/user1/no_root/odoo-9/openerp/service/model.py", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/home/user1/no_root/odoo-9/openerp/http.py", line 309, in checked_call
result = self.endpoint(*a, **kw)
File "/home/user1/no_root/odoo-9/openerp/http.py", line 959, in __call__
return self.method(*args, **kw)
File "/home/user1/no_root/odoo-9/openerp/http.py", line 509, in response_wrap
response = f(*args, **kw)
File "/home/user1/no_root/odoo-9/openerp/addons/web/controllers/main.py", line 892, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/user1/no_root/odoo-9/openerp/addons/web/controllers/main.py", line 884, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/home/user1/no_root/odoo-9/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/home/user1/no_root/odoo-9/openerp/api.py", line 354, in old_api
result = method(recs, *args, **kwargs)
File "/home/user1/no_root/odoo-9/openerp/addons/web_planner/models/web_planner.py", line 45, in render
return self.env['ir.ui.view'].browse(template_id).render(values=values)
File "/home/user1/no_root/odoo-9/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/home/user1/no_root/odoo-9/openerp/api.py", line 574, in new_api
result = method(self._model, cr, uid, self.ids, *args, **old_kwargs)
File "/home/user1/no_root/odoo-9/openerp/addons/web_editor/models/ir_ui_view.py", line 29, in render
return super(view, self).render(cr, uid, id_or_xml_id, values=values, engine=engine, context=context)
File "/home/user1/no_root/odoo-9/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/home/user1/no_root/odoo-9/openerp/addons/base/ir/ir_ui_view.py", line 1070, in render
return self.pool[engine].render(cr, uid, id_or_xml_id, qcontext, loader=loader, context=context)
File "/home/user1/no_root/odoo-9/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/home/user1/no_root/odoo-9/openerp/addons/base/ir/ir_qweb.py", line 252, in render
element = self.get_template(id_or_xml_id, qwebcontext)
File "/home/user1/no_root/odoo-9/openerp/addons/base/ir/ir_qweb.py", line 172, in get_template
document = qwebcontext.loader(name)
File "/home/user1/no_root/odoo-9/openerp/addons/base/ir/ir_ui_view.py", line 1068, in loader
return self.read_template(cr, uid, name, context=context)
File "/home/user1/no_root/odoo-9/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/home/user1/no_root/odoo-9/openerp/addons/base/ir/ir_ui_view.py", line 943, in read_template
return self._read_template(cr, uid, view_id, context=context)
File "/home/user1/no_root/odoo-9/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "<string>", line 2, in _read_template
File "/home/user1/no_root/odoo-9/openerp/tools/cache.py", line 85, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/home/user1/no_root/odoo-9/openerp/addons/base/ir/ir_ui_view.py", line 928, in _read_template
arch = self.read_combined(cr, uid, view_id, fields=['arch'], context=context)['arch']
File "/home/user1/no_root/odoo-9/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/home/user1/no_root/odoo-9/openerp/addons/base/ir/ir_ui_view.py", line 640, in read_combined
view_arch = etree.fromstring(view['arch'].encode('utf-8'))
File "lxml.etree.pyx", line 3092, in lxml.etree.fromstring (src/lxml/lxml.etree.c:70691)
File "parser.pxi", line 1828, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:106689)
File "parser.pxi", line 1716, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:105478)
File "parser.pxi", line 1086, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:100105)
File "parser.pxi", line 580, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:94543)
File "parser.pxi", line 690, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:96003)
File "parser.pxi", line 620, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:95050)
XMLSyntaxError: Entity 'aacute' not defined, line 549, column 76
This is an error within the translations in the language you use.
Most likely, the mistakes have already been corrected. Then, all you have to do is:
Update your Odoo server, by installing the latest all-in-one package, or pulling the latest revision from the Odoo repository on Github,
Loading again the language, making sure to check Overwrite existing terms, in Settings -> Translations -> Load a translation.
Notice:
You currently have to be in debugger mode to see this checkbox
If you wrote custom translations, this can overwrite them
If this doesn't solve your issue, this is likely there are still mistakes within the translations of your language. You can then contact the Odoo support by email (online#odoo.com).

Odoo 8 error when trying to open customer

I am using Odoo 8 on Ubuntu.
I have problem opening some customers (some are OK). When I try to open it for editing I get Odoo Server Error...IndexError: list index out of range.
Any idea what could cause this problem ? I tried to search for similar problems but I have not found any solution. So when I want to edit the client I have to create new one, I also tried to merge them after creating new one but the error reappears again.
thank you and here is complete traceback:
Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo/odoo/openerp/http.py", line 530, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo/openerp/http.py", line 567, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo/openerp/http.py", line 303, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/odoo/openerp/http.py", line 300, in checked_call
return self.endpoint(*a, **kw)
File "/opt/odoo/odoo/openerp/http.py", line 796, in __call__
return self.method(*args, **kw)
File "/opt/odoo/odoo/openerp/http.py", line 396, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/odoo/addons/web/controllers/main.py", line 949, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/odoo/addons/web/controllers/main.py", line 932, in _call_kw
records = getattr(request.session.model(model), method)(*args, **kwargs)
File "/opt/odoo/odoo/openerp/http.py", line 900, in proxy
result = meth(cr, request.uid, *args, **kw)
File "/opt/odoo/odoo/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/odoo/openerp/models.py", line 3109, in read
result = BaseModel.read(records, fields, load=load)
File "/opt/odoo/odoo/openerp/api.py", line 239, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/odoo/openerp/models.py", line 3141, in read
self._read_from_database(stored)
File "/opt/odoo/odoo/openerp/api.py", line 239, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/odoo/openerp/models.py", line 3305, in _read_from_database
res2 = self._columns[f].get(cr, self._model, ids, f, user, context=context, values=result)
File "/opt/odoo/odoo/openerp/osv/fields.py", line 1361, in get
result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
File "/opt/odoo/odoo/addons/account/partner.py", line 246, in _invoice_total
result[partner.id] = sum(inv.user_currency_price_total for inv in invoices)
File "/opt/odoo/odoo/addons/account/partner.py", line 246, in <genexpr>
result[partner.id] = sum(inv.user_currency_price_total for inv in invoices)
File "/opt/odoo/odoo/openerp/fields.py", line 760, in __get__
self.determine_value(record)
File "/opt/odoo/odoo/openerp/fields.py", line 853, in determine_value
record._prefetch_field(self)
File "/opt/odoo/odoo/openerp/api.py", line 239, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/odoo/openerp/models.py", line 3196, in _prefetch_field
result = records.read(list(fnames), load='_classic_write')
File "/opt/odoo/odoo/openerp/api.py", line 239, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/odoo/openerp/models.py", line 3141, in read
self._read_from_database(stored)
File "/opt/odoo/odoo/openerp/api.py", line 239, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/odoo/openerp/models.py", line 3292, in _read_from_database
res2 = self._columns[fs[0]].get(cr, self._model, ids, fs, user, context=context, values=result)
File "/opt/odoo/odoo/openerp/osv/fields.py", line 1361, in get
result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
File "/opt/odoo/odoo/addons/account/report/account_invoice_report.py", line 40, in _compute_amounts_in_user_currency
currency_rate_id = currency_rate_obj.search(cr, uid, [('rate', '=', 1)], limit=1, context=context)[0]
IndexError: list index out of range
in the searching of currency_rate_id, the search function is getting an empty list and you are trying to select the first element from the empty list which causes the error
The solution is to add an exchange rate for the currency.
1 - Settings->Companies
2 - Edit your commpany
3 - Modify the Currency update configuration
4 - Add values for "Currencies to update" tab
Image 1
Image 2
Image 3

Odoo 8 error when trying to open product with multiple attributes

Our Odoo is version 8 and is running on Ubuntu.
When I try to open product which has multiple attributes (colours, sizes) I get KeyError: 57. Other simple products are OK.
Any idea what can cause this problem ?
here is complete traceback:
Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo/odoo/openerp/http.py", line 530, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo/openerp/http.py", line 567, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo/openerp/http.py", line 303, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/odoo/openerp/http.py", line 300, in checked_call
return self.endpoint(*a, **kw)
File "/opt/odoo/odoo/openerp/http.py", line 796, in __call__
return self.method(*args, **kw)
File "/opt/odoo/odoo/openerp/http.py", line 396, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/odoo/addons/web/controllers/main.py", line 949, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/odoo/addons/web/controllers/main.py", line 932, in _call_kw
records = getattr(request.session.model(model), method)(*args, **kwargs)
File "/opt/odoo/odoo/openerp/http.py", line 900, in proxy
result = meth(cr, request.uid, *args, **kw)
File "/opt/odoo/odoo/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/odoo/openerp/models.py", line 3109, in read
result = BaseModel.read(records, fields, load=load)
File "/opt/odoo/odoo/openerp/api.py", line 239, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/odoo/openerp/models.py", line 3141, in read
self._read_from_database(stored)
File "/opt/odoo/odoo/openerp/api.py", line 239, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/odoo/openerp/models.py", line 3305, in _read_from_database
res2 = self._columns[f].get(cr, self._model, ids, f, user, context=context, values=result)
File "/opt/odoo/odoo/openerp/osv/fields.py", line 1361, in get
result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
File "/opt/odoo/odoo/addons/sale/sale.py", line 1283, in _sales_count
res[template.id] = sum([p.sales_count for p in template.product_variant_ids])
File "/opt/odoo/odoo/openerp/fields.py", line 760, in __get__
self.determine_value(record)
File "/opt/odoo/odoo/openerp/fields.py", line 853, in determine_value
record._prefetch_field(self)
File "/opt/odoo/odoo/openerp/api.py", line 239, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/odoo/openerp/models.py", line 3196, in _prefetch_field
result = records.read(list(fnames), load='_classic_write')
File "/opt/odoo/odoo/openerp/api.py", line 239, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/odoo/openerp/models.py", line 3141, in read
self._read_from_database(stored)
File "/opt/odoo/odoo/openerp/api.py", line 239, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/odoo/openerp/models.py", line 3308, in _read_from_database
vals[f] = res2[vals['id']]
KeyError: 57
I got same error like your log, but I don't know your code details. You should check field type.
In my case, I used field function.
I was make mistaken like below:
rec = obj.browse(cr,...)
result = {}
# result[id] = val # wrong
result[rec.id] = val # correct
I hope this helps..