Jasper Report Module on OpenERP 7 - python

I was trying to install Jasper Report module for OpenERP 7
I got them Syleam mdule from here
https://github.com/syleam/openerp-jasperserver
and download OpenERP 7 from here
http://nightly.openerp.com/7.0/nightly/src/
I already install httplib2, pyPdf and python-dime that was required for this module.But when i try to install the module i got this error
OpenERP Server Error
Client Traceback (most recent call last): File
"/opt/openerp-7/openerp/addons/web/http.py", line 204, in dispatch
response["result"] = method(self, **self.params) File "/opt/openerp-7/openerp/addons/web/controllers/main.py", line 1132, in
call_button
action = self._call_kw(req, model, method, args, {}) File "/opt/openerp-7/openerp/addons/web/controllers/main.py", line 1120, in
_call_kw
return getattr(req.session.model(model), method)(*args, **kwargs) File "/opt/openerp-7/openerp/addons/web/session.py", line 42, in proxy
result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args,
kw) File "/opt/openerp-7/openerp/addons/web/session.py", line 30, in
proxy_method
result = self.session.send(self.service_name, method, *args) File "/opt/openerp-7/openerp/addons/web/session.py", line 103, in send
raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
Server Traceback (most recent call last): File
"/opt/openerp-7/openerp/addons/web/session.py", line 89, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/opt/openerp-7/openerp/netsvc.py", line 296, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp-7/openerp/service/web_services.py", line
626, in dispatch
res = fn(db, uid, *params) File "/opt/openerp-7/openerp/osv/osv.py", line 190, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {}) File "/opt/openerp-7/openerp/osv/osv.py", line 132, in wrapper
return f(self, dbname, *args, **kwargs) File "/opt/openerp-7/openerp/osv/osv.py", line 199, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw) File "/opt/openerp-7/openerp/osv/osv.py", line 187, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw) File "/opt/openerp-7/openerp/addons/base/module/module.py", line 426, in
button_immediate_install
return self._button_immediate_function(cr, uid, ids, self.button_install, context=context) File
"/opt/openerp-7/openerp/addons/base/module/module.py", line 477, in
_button_immediate_function
_, pool = pooler.restart_pool(cr.dbname, update_module=True) File "/opt/openerp-7/openerp/pooler.py", line 39, in restart_pool
registry = RegistryManager.new(db_name, force_demo, status, update_module) File "/opt/openerp-7/openerp/modules/registry.py",
line 233, in new
openerp.modules.load_modules(registry.db, force_demo, status, update_module) File "/opt/openerp-7/openerp/modules/loading.py",
line 354, in load_modules
loaded_modules, update_module) File "/opt/openerp-7/openerp/modules/loading.py", line 256, in
load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules,
perform_checks=perform_checks) File
"/opt/openerp-7/openerp/modules/loading.py", line 188, in
load_module_graph
load_data(module_name, idref, mode) File "/opt/openerp-7/openerp/modules/loading.py", line 76, in
load_data = lambda *args: _load_data(cr, *args, kind='data') File "/opt/openerp-7/openerp/modules/loading.py", line 124, in
_load_data
tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report) File "/opt/openerp-7/openerp/tools/convert.py",
line 959, in convert_xml_import
obj.parse(doc.getroot()) File "/opt/openerp-7/openerp/tools/convert.py", line 852, in parse
self._tags[rec.tag](self.cr, rec, n) File "/opt/openerp-7/openerp/tools/convert.py", line 812, in _tag_record
f_val = _eval_xml(self,field, self.pool, cr, self.uid, self.idref) File "/opt/openerp-7/openerp/tools/convert.py", line 154, in _eval_xml
for n in node]), idref) File "/opt/openerp-7/openerp/tools/convert.py", line 148, in _process
idref[id]=self.id_get(cr, id) File "/opt/openerp-7/openerp/tools/convert.py", line 829, in id_get
res = self.model_id_get(cr, id_str) File "/opt/openerp-7/openerp/tools/convert.py", line 838, in model_id_get
return model_data_obj.get_object_reference(cr, self.uid, mod, id_str) File "/opt/openerp-7/openerp/tools/cache.py", line 18, in
lookup
r = self.lookup(self2, cr, *args) File "/opt/openerp-7/openerp/tools/cache.py", line 46, in lookup
value = d[key] = self.method(self2, cr, *args) File "/opt/openerp-7/openerp/addons/base/ir/ir_model.py", line 876, in
get_object_reference
data_id = self._get_id(cr, uid, module, xml_id) File "/opt/openerp-7/openerp/tools/cache.py", line 18, in lookup
r = self.lookup(self2, cr, *args) File "/opt/openerp-7/openerp/tools/cache.py", line 46, in lookup
value = d[key] = self.method(self2, cr, *args) File "/opt/openerp-7/openerp/addons/base/ir/ir_model.py", line 869, in
_get_id
raise ValueError('No such external ID currently defined in the system: %s.%s' % (module, xml_id)) ValueError: No such external ID
currently defined in the system:
jasper_server.load_jrxml_file_wizard_action
Anyone can help me what happen and how to solve that ?
oh and 1 more when i try to open module jasper_server_wizard_sample i got an error too (open not install)

There is currently an open Pull Request to " install module without error about missing reference".
Maybe it's a bug and that PR fixes it.

Related

How to fix model error when upgrading module in odoo 13

I get this error when I try to upgrade my custom module in odoo 13.
Odoo Server Error
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/http.py", line 619, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/odoo-server/odoo/http.py", line 309, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/odoo/odoo-server/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/odoo/odoo-server/odoo/http.py", line 664, in dispatch
result = self._call_function(**self.params)
File "/odoo/odoo-server/odoo/http.py", line 345, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/odoo/odoo-server/odoo/service/model.py", line 93, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo/odoo-server/odoo/http.py", line 338, in checked_call
result = self.endpoint(*a, **kw)
File "/odoo/odoo-server/odoo/http.py", line 910, in __call__
return self.method(*args, **kw)
File "/odoo/odoo-server/odoo/http.py", line 510, in response_wrap
response = f(*args, **kw)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 1324, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 1312, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 387, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 374, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-64>", line 2, in button_immediate_upgrade
File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 72, in check_and_log
return method(self, *args, **kwargs)
File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 629, in button_immediate_upgrade
return self._button_immediate_function(type(self).button_upgrade)
File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 573, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/odoo/odoo-server/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/odoo/odoo-server/odoo/modules/loading.py", line 471, in load_modules
env['ir.model.data']._process_end(processed_modules)
File "/odoo/odoo-server/odoo/addons/base/models/ir_model.py", line 1971, in _process_end
record.unlink()
File "/odoo/odoo-server/odoo/addons/base/models/ir_model.py", line 1190, in unlink
table=self.env[selection.field_id.model]._table,
File "/opt/odoo/odoo13/odoo/api.py", line 463, in __getitem__
return self.registry[model_name]._browse(self, (), ())
File "/opt/odoo/odoo13/odoo/modules/registry.py", line 177, in __getitem__
return self.models[model_name]
KeyError: 'sales.terms'
This is the sales.terms model
class SalesTermsAndConditions(models.Model):
_name = 'sales.terms'
_description = 'Terms and Conditions'
_rec_name = 'typex'
new_type = fields.Selection([
('accessories', 'Accessories'),
('glass', 'Glass Work'),
('aluminium', 'Aluminium profiles'),
('projects', 'Projects')
], string='Testing')
d_active = fields.Boolean(string='Active')
notes = fields.Text()
I have a new model named 'sales.terms' I created and I created the corresponding ir.model.access.csv file for it, so I traced down the error and discovered that it isn't the whole model giving causing the error but just the selection field, if i remove the selection field the module upgrades fine.
I am confused as to what might be wrong.
I think there is something missing
class SalesTermsAndConditions(models.Model):
_name = 'sales.terms'
_description = 'Terms and Conditions'
_rec_name = 'typex'
new_type = fields.Selection([
('test', 'Test'),
('atest', 'A test'), // Comma is missing
('accessories', 'Accessories'),
('glass', 'Glass Work'),
('aluminium', 'Aluminium profiles'),
('projects', 'Projects')
], string='Testing')
d_active = fields.Boolean(string='Active')
notes = fields.Text()
Try to remove _rec_name.Replace with some field.
_rec_name = "new_type"
The selection seem to be ok. if you rename new_type does it then upgrade?
Can you look first errors wen you boot odoo or reload modules

google-api-python-client broken by OAuth2?

I am trying to check whether a certain dataset exists in BigQuery and I get this very strange error I've never had untill yesterday:
ERROR:dsUtils.bq_utils:Could not check if dataset tmp exists.
Traceback (most recent call last):
File "C:\Users\paco\Anaconda3\envs\visitForecastEnv\lib\site-packages\dsUtils\bq_utils.py", line 113, in _get
resp = bq_service.datasets().get(projectId=self.project_id, datasetId=self.id).execute(num_retries=2)
File "C:\Users\paco\Anaconda3\envs\visitForecastEnv\lib\site-packages\oauth2client\util.py", line 137, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Users\paco\Anaconda3\envs\visitForecastEnv\lib\site-packages\googleapiclient\http.py", line 755, in execute
method=str(self.method), body=self.body, headers=self.headers)
File "C:\Users\paco\Anaconda3\envs\visitForecastEnv\lib\site-packages\googleapiclient\http.py", line 93, in _retry_request
resp, content = http.request(uri, method, *args, **kwargs)
File "C:\Users\paco\Anaconda3\envs\visitForecastEnv\lib\site-packages\oauth2client\client.py", line 598, in new_request
self._refresh(request_orig)
File "C:\Users\paco\Anaconda3\envs\visitForecastEnv\lib\site-packages\oauth2client\client.py", line 864, in _refresh
self._do_refresh_request(http_request)
File "C:\Users\paco\Anaconda3\envs\visitForecastEnv\lib\site-packages\oauth2client\client.py", line 891, in _do_refresh_request
body = self._generate_refresh_request_body()
File "C:\Users\paco\Anaconda3\envs\visitForecastEnv\lib\site-packages\oauth2client\client.py", line 1597, in _generate_refresh_request_body
assertion = self._generate_assertion()
File "C:\Users\paco\Anaconda3\envs\visitForecastEnv\lib\site-packages\oauth2client\service_account.py", line 318, in _generate_assertion
key_id=self._private_key_id)
File "C:\Users\paco\Anaconda3\envs\visitForecastEnv\lib\site-packages\oauth2client\crypt.py", line 97, in make_signed_jwt
signature = signer.sign(signing_input)
File "C:\Users\paco\Anaconda3\envs\visitForecastEnv\lib\site-packages\oauth2client\_pycrypto_crypt.py", line 101, in sign
return PKCS1_v1_5.new(self._key).sign(SHA256.new(message))
File "C:\Users\paco\Anaconda3\envs\visitForecastEnv\lib\site-packages\Crypto\Signature\PKCS1_v1_5.py", line 112, in sign
m = self._key.decrypt(em)
File "C:\Users\paco\Anaconda3\envs\visitForecastEnv\lib\site-packages\Crypto\PublicKey\RSA.py", line 174, in decrypt
return pubkey.pubkey.decrypt(self, ciphertext)
File "C:\Users\paco\Anaconda3\envs\visitForecastEnv\lib\site-packages\Crypto\PublicKey\pubkey.py", line 93, in decrypt
plaintext=self._decrypt(ciphertext)
File "C:\Users\paco\Anaconda3\envs\visitForecastEnv\lib\site-packages\Crypto\PublicKey\RSA.py", line 235, in _decrypt
r = getRandomRange(1, self.key.n-1, randfunc=self._randfunc)
File "C:\Users\paco\Anaconda3\envs\visitForecastEnv\lib\site-packages\Crypto\PublicKey\RSA.py", line 126, in __getattr__
raise AttributeError("%s object has no %r attribute" % (self.__class__.__name__, attrname,))
AttributeError: _RSAobj object has no '_randfunc' attribute
Has anyone an idea of why I get these errors suddenly?

How to resolve the error in Odoo 8?

Recently I had restored a Odoo DB to a newly created instance, From then on i am getting the following error whenever I go to the respective menu :
KeyError: u'mro.request'
How to resolve such kind of errors?
Any suggestion would be really helpful. Thanks!!
Traceback (most recent call last):
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/http.py", line 517, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/http.py", line 538, in dispatch
result = self._call_function(**self.params)
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/http.py", line 294, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/http.py", line 291, in checked_call
return self.endpoint(*a, **kw)
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/http.py", line 754, in __call__
return self.method(*args, **kw)
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/http.py", line 387, in response_wrap
response = f(*args, **kw)
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/addons/web/controllers/main.py", line 1251, in load
action = request.session.model(action_type).read([action_id], False, ctx)
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/http.py", line 856, in proxy
result = meth(cr, request.uid, *args, **kw)
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/addons/base/ir/ir_actions.py", line 326, in read
results = super(ir_actions_act_window, self).read(cr, uid, ids, fields=fields, context=context, load=load)
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/models.py", line 3083, in read
result = BaseModel.read(records, fields, load=load)
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/api.py", line 235, in wrapper
return new_api(self, *args, **kwargs)
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/models.py", line 3115, in read
self._read_from_database(stored)
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/api.py", line 235, in wrapper
return new_api(self, *args, **kwargs)
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/models.py", line 3279, in _read_from_database
res2 = self._columns[f].get(cr, self._model, ids, f, user, context=context, values=result)
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/osv/fields.py", line 1356, in get
result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/addons/base/ir/ir_actions.py", line 265, in _search_view
field_get = self.pool[act.res_model].fields_view_get(cr, uid,
File "/home/administrator/second2/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/modules/registry.py", line 101, in __getitem__
return self.models[model_name]
KeyError: u'mro.request'
I solved the above problem by upgrading the modules which were in the dependencies.

Odoo 9 Database creation error: Unable to use a closed cursor

When I try to run Odoo from the source file with the option:
Load demonstration data (Check this box to evaluate Odoo)
checked, I get the following error:
Database creation error: Unable to use a closed cursor.
It works when I try to run it without the demonstration data. I am running it on Ubuntu 14.04 with Postresql 9.4. What did I miss?
And on the console it also displays:
`2016-01-20 10:49:23,513 5089 ERROR mydb openerp.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/vagrant_data/odoo-9.0/openerp/modules/registry.py", line 385, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/vagrant_data/odoo-9.0/openerp/modules/loading.py", line 279, in load_modules
loaded_modules, processed_modules = load_module_graph(cr, graph, status, perform_checks=update_module, report=report)
File "/vagrant_data/odoo-9.0/openerp/modules/loading.py", line 159, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='demo')
File "/vagrant_data/odoo-9.0/openerp/modules/loading.py", line 98, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "/vagrant_data/odoo-9.0/openerp/tools/convert.py", line 852, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/vagrant_data/odoo-9.0/openerp/tools/convert.py", line 939, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/vagrant_data/odoo-9.0/openerp/tools/convert.py", line 802, in parse
self.parse(rec, mode)
File "/vagrant_data/odoo-9.0/openerp/tools/convert.py", line 805, in parse
self._tags[rec.tag](self.cr, rec, de, mode=mode)
File "/vagrant_data/odoo-9.0/openerp/tools/convert.py", line 709, in _tag_record
id = self.pool['ir.model.data']._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
File "/vagrant_data/odoo-9.0/openerp/api.py", line 238, in wrapper
return old_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/addons/base/ir/ir_model.py", line 1101, in _update
res_id = model_obj.create(cr, uid, values, context=context)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 238, in wrapper
return old_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/addons/base/res/res_users.py", line 845, in create
return super(users_view, self).create(cr, uid, values, context)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 238, in wrapper
return old_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/addons/base/res/res_users.py", line 643, in create
user_id = super(users_implied, self).create(cr, uid, values, context)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 238, in wrapper
return old_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/addons/base/res/res_users.py", line 336, in create
user_id = super(res_users, self).create(cr, uid, vals, context=context)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 238, in wrapper
return old_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 342, in old_api
result = method(recs, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 4132, in create
record = self.browse(self._create(old_vals))
File "/vagrant_data/odoo-9.0/openerp/api.py", line 236, in wrapper
return new_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 478, in new_api
result = method(self._model, cr, uid, *args, **old_kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 4190, in _create
self.pool[table].write(cr, user, [record_id], tocreate[table], context=context)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 238, in wrapper
return old_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 369, in old_api
result = method(recs, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/addons/base/res/res_partner.py", line 536, in write
result = super(res_partner, self).write(vals)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 236, in wrapper
return new_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 3819, in write
self._write(old_vals)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 236, in wrapper
return new_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 562, in new_api
result = method(self._model, cr, uid, self.ids, *args, **old_kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 3970, in _write
result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or []
File "/vagrant_data/odoo-9.0/openerp/osv/fields.py", line 638, in set
att.write({'datas': value})
File "/vagrant_data/odoo-9.0/openerp/api.py", line 236, in wrapper
return new_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 562, in new_api
result = method(self._model, cr, uid, self.ids, *args, **old_kwargs)
File "/vagrant_data/odoo-9.0/openerp/addons/base/ir/ir_attachment.py", line 429, in write
return super(ir_attachment, self).write(cr, uid, ids, vals, context)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 238, in wrapper
return old_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 369, in old_api
result = method(recs, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 3819, in write
self._write(old_vals)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 236, in wrapper
return new_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 562, in new_api
result = method(self._model, cr, uid, self.ids, *args, **old_kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 3970, in _write
result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or []
File "/vagrant_data/odoo-9.0/openerp/osv/fields.py", line 1512, in set
self._fnct_inv(obj, cr, user, id, name, value, self._fnct_inv_arg, context)
File "/vagrant_data/odoo-9.0/openerp/addons/base/ir/ir_attachment.py", line 228, in _data_set
super(ir_attachment, self).write(cr, SUPERUSER_ID, [id], vals, context=context)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 238, in wrapper
return old_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 369, in old_api
result = method(recs, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 3819, in write
self._write(old_vals)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 236, in wrapper
return new_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 562, in new_api
result = method(self._model, cr, uid, self.ids, *args, **old_kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 4079, in _write
recs.recompute()
File "/vagrant_data/odoo-9.0/openerp/api.py", line 236, in wrapper
return new_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 5828, in recompute
vals = rec._convert_to_write({n: rec[n] for n in ns})
File "/vagrant_data/odoo-9.0/openerp/models.py", line 5828, in <dictcomp>
vals = rec._convert_to_write({n: rec[n] for n in ns})
File "/vagrant_data/odoo-9.0/openerp/models.py", line 5715, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/vagrant_data/odoo-9.0/openerp/fields.py", line 807, in __get__
self.determine_value(record)
File "/vagrant_data/odoo-9.0/openerp/fields.py", line 889, in determine_value
self.compute_value(recs)
File "/vagrant_data/odoo-9.0/openerp/fields.py", line 869, in compute_value
self._compute_value(records)
File "/vagrant_data/odoo-9.0/openerp/fields.py", line 859, in _compute_value
getattr(records, self.compute)()
File "/vagrant_data/odoo-9.0/openerp/addons/base/res/res_partner.py", line 288, in _compute_images
rec.image_medium = tools.image_resize_image_medium(rec.image)
File "/vagrant_data/odoo-9.0/openerp/tools/image.py", line 143, in image_resize_image_medium
return image_resize_image(base64_source, size, encoding, filetype, avoid_if_small)
File "/vagrant_data/odoo-9.0/openerp/tools/image.py", line 73, in image_resize_image
image = image_resize_and_sharpen(image, size)
File "/vagrant_data/odoo-9.0/openerp/tools/image.py", line 92, in image_resize_and_sharpen
image = image.convert('RGBA')
File "/home/vagrant/odoo/local/lib/python2.7/site-packages/PIL/Image.py", line 832, in convert
self.load()
File "/home/vagrant/odoo/local/lib/python2.7/site-packages/PIL/ImageFile.py", line 200, in load
d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
File "/home/vagrant/odoo/local/lib/python2.7/site-packages/PIL/Image.py", line 417, in _getdecoder
raise IOError("decoder %s not available" % decoder_name)
ParseError: "decoder jpeg not available" while parsing /vagrant_data/odoo-9.0/openerp/addons/base/base_demo.xml:38, near
<record id="user_demo" model="res.users">
<field name="partner_id" ref="base.partner_demo"/>
<field name="login">demo</field>
<field name="password">demo</field>
<field name="signature">--
Mr Demo</field>
<field name="company_id" ref="main_company"/>
<field name="groups_id" eval="[(6,0,[ref('base.group_user'), ref('base.group_partner_manager')])]"/>
<field name="image" type="base64" file="base/static/img/user_demo-image.jpg"/>
</record>
2016-01-20 10:49:23,555 5089 ERROR mydb openerp.service.db: CREATE DATABASE failed:
Traceback (most recent call last):
File "/vagrant_data/odoo-9.0/openerp/service/db.py", line 49, in _initialize_db
db_name, demo, None, update_module=True)
File "/vagrant_data/odoo-9.0/openerp/modules/registry.py", line 385, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/vagrant_data/odoo-9.0/openerp/modules/loading.py", line 279, in load_modules
loaded_modules, processed_modules = load_module_graph(cr, graph, status, perform_checks=update_module, report=report)
File "/vagrant_data/odoo-9.0/openerp/modules/loading.py", line 159, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='demo')
File "/vagrant_data/odoo-9.0/openerp/modules/loading.py", line 98, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "/vagrant_data/odoo-9.0/openerp/tools/convert.py", line 852, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/vagrant_data/odoo-9.0/openerp/tools/convert.py", line 939, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/vagrant_data/odoo-9.0/openerp/tools/convert.py", line 802, in parse
self.parse(rec, mode)
File "/vagrant_data/odoo-9.0/openerp/tools/convert.py", line 805, in parse
self._tags[rec.tag](self.cr, rec, de, mode=mode)
File "/vagrant_data/odoo-9.0/openerp/tools/convert.py", line 709, in _tag_record
id = self.pool['ir.model.data']._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
File "/vagrant_data/odoo-9.0/openerp/api.py", line 238, in wrapper
return old_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/addons/base/ir/ir_model.py", line 1101, in _update
res_id = model_obj.create(cr, uid, values, context=context)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 238, in wrapper
return old_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/addons/base/res/res_users.py", line 845, in create
return super(users_view, self).create(cr, uid, values, context)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 238, in wrapper
return old_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/addons/base/res/res_users.py", line 643, in create
user_id = super(users_implied, self).create(cr, uid, values, context)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 238, in wrapper
return old_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/addons/base/res/res_users.py", line 336, in create
user_id = super(res_users, self).create(cr, uid, vals, context=context)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 238, in wrapper
return old_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 342, in old_api
result = method(recs, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 4132, in create
record = self.browse(self._create(old_vals))
File "/vagrant_data/odoo-9.0/openerp/api.py", line 236, in wrapper
return new_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 478, in new_api
result = method(self._model, cr, uid, *args, **old_kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 4190, in _create
self.pool[table].write(cr, user, [record_id], tocreate[table], context=context)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 238, in wrapper
return old_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 369, in old_api
result = method(recs, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/addons/base/res/res_partner.py", line 536, in write
result = super(res_partner, self).write(vals)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 236, in wrapper
return new_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 3819, in write
self._write(old_vals)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 236, in wrapper
return new_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 562, in new_api
result = method(self._model, cr, uid, self.ids, *args, **old_kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 3970, in _write
result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or []
File "/vagrant_data/odoo-9.0/openerp/osv/fields.py", line 638, in set
att.write({'datas': value})
File "/vagrant_data/odoo-9.0/openerp/api.py", line 236, in wrapper
return new_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 562, in new_api
result = method(self._model, cr, uid, self.ids, *args, **old_kwargs)
File "/vagrant_data/odoo-9.0/openerp/addons/base/ir/ir_attachment.py", line 429, in write
return super(ir_attachment, self).write(cr, uid, ids, vals, context)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 238, in wrapper
return old_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 369, in old_api
result = method(recs, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 3819, in write
self._write(old_vals)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 236, in wrapper
return new_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 562, in new_api
result = method(self._model, cr, uid, self.ids, *args, **old_kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 3970, in _write
result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or []
File "/vagrant_data/odoo-9.0/openerp/osv/fields.py", line 1512, in set
self._fnct_inv(obj, cr, user, id, name, value, self._fnct_inv_arg, context)
File "/vagrant_data/odoo-9.0/openerp/addons/base/ir/ir_attachment.py", line 228, in _data_set
super(ir_attachment, self).write(cr, SUPERUSER_ID, [id], vals, context=context)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 238, in wrapper
return old_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 369, in old_api
result = method(recs, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 3819, in write
self._write(old_vals)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 236, in wrapper
return new_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 562, in new_api
result = method(self._model, cr, uid, self.ids, *args, **old_kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 4079, in _write
recs.recompute()
File "/vagrant_data/odoo-9.0/openerp/api.py", line 236, in wrapper
return new_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 5828, in recompute
vals = rec._convert_to_write({n: rec[n] for n in ns})
File "/vagrant_data/odoo-9.0/openerp/models.py", line 5828, in <dictcomp>
vals = rec._convert_to_write({n: rec[n] for n in ns})
File "/vagrant_data/odoo-9.0/openerp/models.py", line 5715, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/vagrant_data/odoo-9.0/openerp/fields.py", line 807, in __get__
self.determine_value(record)
File "/vagrant_data/odoo-9.0/openerp/fields.py", line 889, in determine_value
self.compute_value(recs)
File "/vagrant_data/odoo-9.0/openerp/fields.py", line 869, in compute_value
self._compute_value(records)
File "/vagrant_data/odoo-9.0/openerp/fields.py", line 859, in _compute_value
getattr(records, self.compute)()
File "/vagrant_data/odoo-9.0/openerp/addons/base/res/res_partner.py", line 288, in _compute_images
rec.image_medium = tools.image_resize_image_medium(rec.image)
File "/vagrant_data/odoo-9.0/openerp/tools/image.py", line 143, in image_resize_image_medium
return image_resize_image(base64_source, size, encoding, filetype, avoid_if_small)
File "/vagrant_data/odoo-9.0/openerp/tools/image.py", line 73, in image_resize_image
image = image_resize_and_sharpen(image, size)
File "/vagrant_data/odoo-9.0/openerp/tools/image.py", line 92, in image_resize_and_sharpen
image = image.convert('RGBA')
File "/home/vagrant/odoo/local/lib/python2.7/site-packages/PIL/Image.py", line 832, in convert
self.load()
File "/home/vagrant/odoo/local/lib/python2.7/site-packages/PIL/ImageFile.py", line 200, in load
d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
File "/home/vagrant/odoo/local/lib/python2.7/site-packages/PIL/Image.py", line 417, in _getdecoder
raise IOError("decoder %s not available" % decoder_name)
ParseError: "decoder jpeg not available" while parsing /vagrant_data/odoo-9.0/openerp/addons/base/base_demo.xml:38, near
<record id="user_demo" model="res.users">
<field name="partner_id" ref="base.partner_demo"/>
<field name="login">demo</field>
<field name="password">demo</field>
<field name="signature">--
Mr Demo</field>
<field name="company_id" ref="main_company"/>
<field name="groups_id" eval="[(6,0,[ref('base.group_user'), ref('base.group_partner_manager')])]"/>
<field name="image" type="base64" file="base/static/img/user_demo-image.jpg"/>
</record>
2016-01-20 10:49:23,585 5089 INFO mydb openerp.modules.loading: loading 1 modules...
2016-01-20 10:49:23,640 5089 INFO mydb openerp.modules.module: module base: creating or updating database tables
2016-01-20 10:49:24,479 5089 ERROR mydb openerp.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/vagrant_data/odoo-9.0/openerp/modules/registry.py", line 385, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/vagrant_data/odoo-9.0/openerp/modules/loading.py", line 279, in load_modules
loaded_modules, processed_modules = load_module_graph(cr, graph, status, perform_checks=update_module, report=report)
File "/vagrant_data/odoo-9.0/openerp/modules/loading.py", line 137, in load_module_graph
init_module_models(cr, package.name, models)
File "/vagrant_data/odoo-9.0/openerp/modules/module.py", line 306, in init_module_models
obj_list[0].recompute(cr, openerp.SUPERUSER_ID, {})
File "/vagrant_data/odoo-9.0/openerp/api.py", line 238, in wrapper
return old_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 342, in old_api
result = method(recs, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 5827, in recompute
for rec in recs.exists():
File "/vagrant_data/odoo-9.0/openerp/api.py", line 236, in wrapper
return new_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 4967, in exists
self._cr.execute(query, [tuple(ids)])
File "/vagrant_data/odoo-9.0/openerp/sql_db.py", line 138, in wrapper
raise psycopg2.OperationalError(msg)
OperationalError: Unable to use a closed cursor.
2016-01-20 10:49:24,488 5089 ERROR mydb openerp.http: Unable to use a closed cursor.
Traceback (most recent call last):
File "/vagrant_data/odoo-9.0/openerp/http.py", line 114, in dispatch_rpc
result = dispatch(method, params)
File "/vagrant_data/odoo-9.0/openerp/service/common.py", line 57, in dispatch
return g[exp_method_name](*params)
File "/vagrant_data/odoo-9.0/openerp/service/common.py", line 29, in exp_authenticate
res_users = openerp.registry(db)['res.users']
File "/vagrant_data/odoo-9.0/openerp/__init__.py", line 50, in registry
return modules.registry.RegistryManager.get(database_name)
File "/vagrant_data/odoo-9.0/openerp/modules/registry.py", line 354, in get
update_module)
File "/vagrant_data/odoo-9.0/openerp/modules/registry.py", line 385, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/vagrant_data/odoo-9.0/openerp/modules/loading.py", line 279, in load_modules
loaded_modules, processed_modules = load_module_graph(cr, graph, status, perform_checks=update_module, report=report)
File "/vagrant_data/odoo-9.0/openerp/modules/loading.py", line 137, in load_module_graph
init_module_models(cr, package.name, models)
File "/vagrant_data/odoo-9.0/openerp/modules/module.py", line 306, in init_module_models
obj_list[0].recompute(cr, openerp.SUPERUSER_ID, {})
File "/vagrant_data/odoo-9.0/openerp/api.py", line 238, in wrapper
return old_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/api.py", line 342, in old_api
result = method(recs, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 5827, in recompute
for rec in recs.exists():
File "/vagrant_data/odoo-9.0/openerp/api.py", line 236, in wrapper
return new_api(self, *args, **kwargs)
File "/vagrant_data/odoo-9.0/openerp/models.py", line 4967, in exists
self._cr.execute(query, [tuple(ids)])
File "/vagrant_data/odoo-9.0/openerp/sql_db.py", line 138, in wrapper
raise psycopg2.OperationalError(msg)
OperationalError: Unable to use a closed cursor.`

Error in Synchronize Translation Openerp 7

I am getting this strange error when trying to synchronize terms in Openerp 7.
I had imported some terms for german language through a CSV file before but now I only have English installed.
OpenERP Server Error
Client Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/addons/web/http.py", line 204, in dispatch
response["result"] = method(self, **self.params)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/addons/web/controllers/main.py", line 1132, in call_button
action = self._call_kw(req, model, method, args, {})
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/addons/web/controllers/main.py", line 1120, in _call_kw
return getattr(req.session.model(model), method)(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/addons/web/session.py", line 42, in proxy
result=self.proxy.execute_kw(self.session._db,self.session._uid,self.session._password, self.model, method, args, kw)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/addons/web/session.py", line 30, in proxy_method
result = self.session.send(self.service_name, method, *args)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/addons/web/session.py", line 103, in send
raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
Server Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/addons/web/session.py", line 89, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/netsvc.py", line 292, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/service/web_services.py", line 626, in dispatch
res = fn(db, uid, *params)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/osv/osv.py", line 188, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/osv/osv.py", line 131, in wrapper
return f(self, dbname, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/osv/osv.py", line 197, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/osv/osv.py", line 185, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/addons/base/module/wizard/base_update_translations.py", line 47, in act_update
tools.trans_export(this.lang, ['all'], buf, 'csv', cr)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/opener/tools/translate.py", line 496, in trans_export
translations = trans_generate(lang, modules, cr)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/opener/tools/translate.py", line 788, in trans_generate
push_translation(module, 'model', name, xml_name, encode(trad))
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/opener/tools/translate.py", line 648, in push_translation
if not source or len(source.strip()) <= 1:
AttributeError: 'bool' object has no attribute 'strip'
I found the following solution to my problem:
I had set a few custom boolean fields to "translatable" in my models. Un-checking the "translatable" property on them removed the errors.

Categories