10000 Crash when trying to install report_aeroo on odoo 8.0 · Issue #1 · aeroo/aeroo_reports · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Crash when trying to install report_aeroo on odoo 8.0 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alexis-via opened this issue Sep 1, 2014 · 4 comments
Closed

Crash when trying to install report_aeroo on odoo 8.0 #1

alexis-via opened this issue Sep 1, 2014 · 4 comments
Assignees
Labels

Comments

@alexis-via
Copy link
Contributor

I have an up-to-date odoo from github (branch 8.0) and an up-to-date aeroo_reports from github (master branch) running on Ubuntu 12.04.

Here is the scenario to reproduce the bug:

  1. Create a new DB
  2. Install the module report_aeroo via the Settings menu. The installation wizard starts : after the first screen of the wizard, I have the following crash:

2014-09-01 14:43:15,755 5688 ERROR erpv80_aeroo1 openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
File "/home/alexis/new_boite/dev/odoo/openerp/http.py", line 496, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/alexis/new_boite/dev/odoo/openerp/http.py", line 513, in dispatch
result = self._call_function(*_self.params)
File "/home/alexis/new_boite/dev/odoo/openerp/http.py", line 279, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/home/alexis/new_boite/dev/odoo/openerp/service/model.py", line 113, in wrapper
return f(dbname, _args, *_kwargs)
File "/home/alexis/new_boite/dev/odoo/openerp/http.py", line 276, in checked_call
return self.endpoint(_a, *_kw)
File "/home/alexis/new_boite/dev/odoo/openerp/http.py", line 723, in call
return self.method(_args, *_kw)
File "/home/alexis/new_boite/dev/odoo/openerp/http.py", line 372, in response_wrap
response = f(_args, *_kw)
File "/home/alexis/new_boite/dev/odoo/addons/web/controllers/main.py", line 941, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/alexis/new_boite/dev/odoo/addons/web/controllers/main.py", line 933, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/home/alexis/new_boite/dev/odoo/openerp/api.py", line 234, in wrapper
return old_api(self, _args, *_kwargs)
File "/home/alexis/new_boite/dev/odoo/openerp/addons/base/module/module.py", line 149, in fields_view_get
res = super(module, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
File "/home/alexis/new_boite/dev/odoo/openerp/api.py", line 234, in wrapper
return old_api(self, _args, *_kwargs)
File "/home/alexis/new_boite/dev/odoo/openerp/models.py", line 1584, in fields_view_get
resprint = ir_values_obj.get(cr, uid, 'action', 'client_print_multi', [(self._name, False)], False, context)
File "/home/alexis/new_boite/dev/odoo/openerp/api.py", line 234, in wrapper
return old_api(self, _args, *_kwargs)
File "/home/alexis/new_boite/dev/odoo/openerp/addons/base/ir/ir_values.py", line 501, in get
return self._map_legacy_model_list(models, do_get, merge_results=True)
File "/home/alexis/new_boite/dev/odoo/openerp/addons/base/ir/ir_values.py", line 458, in _map_legacy_model_list
result = map_fn(model, res_id)
File "/home/alexis/new_boite/dev/odoo/openerp/addons/base/ir/ir_values.py", line 500, in do_get
return self.get_actions(cr, uid, action_slot=key2, model=model, res_id=res_id, context=context)
File "/home/alexis/new_boite/dev/odoo/openerp/api.py", line 234, in wrapper
return old_api(self, _args, *_kwargs)
File "/home/alexis/new_boite/dev/odoo/openerp/addons/base/ir/ir_values.py", line 429, in get_actions
action_def = action_model.read(cr, uid, int(action_id), fields, context)
File "/home/alexis/new_boite/dev/odoo/openerp/api.py", line 234, in wrapper
return old_api(self, _args, *_kwargs)
File "/home/alexis/new_boite/dev/aeroo-80/report_aeroo/report_xml.py", line 432, in read
res = super(report_xml, self).read(cr, user, ids, fields, context)
File "/home/alexis/new_boite/dev/odoo/openerp/api.py", line 234, in wrapper
return old_api(self, _args, *_kwargs)
File "/home/alexis/new_boite/dev/odoo/openerp/models.py", line 3082, in read
result = BaseModel.read(records, fields, load=load)
File "/home/alexis/new_boite/dev/odoo/openerp/api.py", line 232, in wrapper
return new_api(self, _args, *_kwargs)
File "/home/alexis/new_boite/dev/odoo/openerp/models.py", line 3114, in read
self._read_from_database(stored)
File "/home/alexis/new_boite/dev/odoo/openerp/api.py", line 232, in wrapper
return new_api(self, _args, *_kwargs)
File "/home/alexis/new_boite/dev/odoo/openerp/models.py", line 3284, in _read_from_database
record._cache.update(record._convert_to_cache(vals, validate=False))
File "/home/alexis/new_boite/dev/odoo/openerp/models.py", line 5161, in _convert_to_cache
for name, value in values.iteritems()
File "/home/alexis/new_boite/dev/odoo/openerp/models.py", line 5162, in
if name in fields
File "/home/alexis/new_boite/dev/odoo/openerp/fields.py", line 970, in convert_to_cache
return ustr(value)[:self.size]
TypeError: slice indices must be integers or None or have an index method

@alexis-via
Copy link
Contributor Author

I have found the cause of the bug: in report_aeroo/report_xml.py line 390, in the definition of the field "extras":

'extras': fields.function(_get_extras, method=True, type='char', size='256', string='Extra options'),

The size argument should be an integer, not a string ! So the line should be:

'extras': fields.function(_get_extras, method=True, type='char', size=256, string='Extra options'),

@sraps sraps added the bug label Sep 11, 2014
@sraps sraps self-assigned this Sep 11, 2014
@alexis-via
Copy link
Contributor Author

@sraps
Do you think that the fix I propose in my previous comment is OK ? If yes, could you commit my fix in the main branch ?

@sraps
Copy link
Contributor
sraps commented Oct 3, 2014

Yes, and no, I am struggling with various Odoo core issues, hard to debug and hard to make not closing and wishlisting issues. Like usual with Odoo. Aeroo is not workable due to the Odoo core, at the moment.

This one implication of the bug:
odoo/odoo#2873

@LeartS
Copy link
LeartS commented Oct 8, 2014

@sraps: @alexis-via's fix seems ok to me, the size parameter should (=must) be a integer, not a string, which doesn't make sense. This particular case is not an issue with Odoo core.

@sraps sraps closed this as completed Oct 14, 2014
bishwasubedi pushed a commit to bishwasubedi/aeroo_reports that referenced this issue Dec 11, 2014
Removed 'version="7.0\' in XML views for lastest Odoo version
sraps pushed a commit that referenced this issue Feb 9, 2015
bishwasubedi pushed a commit to bishwasubedi/aeroo_reports that referenced this issue Feb 20, 2015
ae535cd Merge pull request aeroo#1 from gregorlazzarato/master
25a2ae4 set docids for working print buttons
e5c54a6 Merge pull request aeroo#12 from npiganeau/master
c57bf85 Fixed extra functions not working properly
dad424e Moved icon file to /src/description

git-subtree-dir: report_aeroo
git-subtree-split: ae535cd5b9e999b8e0210bd0992b3a053d85b20c
lmignon pushed a commit to acsone/aeroo_reports that referenced this issue Feb 19, 2016
[FIX]Use proper version scheme to be PIP installable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
0