CSV export fails with traceback

Bug #894335 reported by Olivier Dony (Odoo)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Web Team

Bug Description

openerp-web r.1547, server r.3826, addons .5779

1. New db, install sales, enable extended view
2. Sales>Reporting>Sales Analysis, keep default search options
3. Open side-bar, choose Export
4. Switch to "Export all data"
5. Select a few fields, e.g. Salesman, # of lines
6. Export -> server-side traceback:

[2011-11-24 11:06:57,161][?] INFO:werkzeug:127.0.0.1 - - [24/Nov/2011 11:06:57] "POST /web/export/formats HTTP/1.1" 200 -
[2011-11-24 11:06:57,167][?] INFO:werkzeug:127.0.0.1 - - [24/Nov/2011 11:06:57] "POST /web/dataset/search_read HTTP/1.1" 200 -
[2011-11-24 11:06:57,185][?] INFO:werkzeug:127.0.0.1 - - [24/Nov/2011 11:06:57] "POST /web/export/get_fields HTTP/1.1" 200 -
[2011-11-24 11:07:00,494][?] INFO:werkzeug:127.0.0.1 - - [24/Nov/2011 11:07:00] "POST /web/export/get_fields HTTP/1.1" 200 -
[2011-11-24 11:07:10,745][?] INFO:werkzeug:127.0.0.1 - - [24/Nov/2011 11:07:10] "POST /web/export/csv HTTP/1.1" 500 -
[2011-11-24 11:07:10,753][?] ERROR:werkzeug:Error on request:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 159, in run_wsgi
    execute(app)
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 146, in execute
    application_iter = app(environ, start_response)
  File "/home/odo/repositories/server/trunk/openerp/wsgi.py", line 398, in application
    result = handler(environ, start_response)
  File "/home/odo/repositories/web/trunk/addons/web/common/http.py", line 393, in __call__
    return self.dispatch(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 409, in __call__
    return self.app(environ, start_response)
  File "/home/odo/repositories/web/trunk/addons/web/common/http.py", line 419, in dispatch
    result = handler( request, self.config)
  File "/home/odo/repositories/web/trunk/addons/web/common/http.py", line 273, in http_handler
    return HttpRequest(request, config).dispatch(controller, f)
  File "/home/odo/repositories/web/trunk/addons/web/common/http.py", line 228, in dispatch
    r = method(controller, self, **self.params)
  File "/home/odo/repositories/web/trunk/addons/web/controllers/main.py", line 1389, in index
    ids = ids or Model.search(domain, context=context)
TypeError: proxy() got an unexpected keyword argument 'context'

I could have just fixed it but I'm not too sure of other side-effects, so I'll let you double-check.

Related branches

Changed in openerp-web:
status: Confirmed → In Progress
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Looks like **kwargs on model proxies was lost in the switch to the "client library" (or maybe even in the port from 6.0 to 6.1, I'm not sure it ever worked in the new client as the original model proxy API was fairly basic to start with), and I guess nobody noticed because most exports are done on regular lists (thus ids-based, not domain-based).

Moving to an *args-based long form of search

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Should be fixed as of revision <email address hidden>

Changed in openerp-web:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.