Merge lp:~camptocamp/openobject-addons/trunk-fix-1223298 into lp:openobject-addons

Proposed by Yannick Vaucher @ Camptocamp
Status: Needs review
Proposed branch: lp:~camptocamp/openobject-addons/trunk-fix-1223298
Merge into: lp:openobject-addons
Diff against target: 26 lines (+4/-4)
1 file modified
base_import/controllers.py (+4/-4)
To merge this branch: bzr merge lp:~camptocamp/openobject-addons/trunk-fix-1223298
Reviewer Review Type Date Requested Status
Yannick Vaucher @ Camptocamp (community) test Approve
OpenERP Core Team Pending
Review via email: mp+211678@code.launchpad.net

Description of the change

Fix broken base_import due to signature mismatch in trunk

lp:1223298

To post a comment you must log in.
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Tested and it fixes the broken import feature.

(I'm not the author of the fix)

review: Approve (test)

Unmerged revisions

9239. By Salton Massally on 2014-03-19

Fix import controller, request imported instead of being passed as argument. Courtesy of Salton Massally

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'base_import/controllers.py'
2--- base_import/controllers.py 2013-11-27 15:32:57 +0000
3+++ base_import/controllers.py 2014-03-19 10:09:25 +0000
4@@ -1,18 +1,18 @@
5 # -*- coding: utf-8 -*-
6 import simplejson
7
8-from openerp.http import Controller, route
9+from openerp.http import Controller, route, request
10
11 class ImportController(Controller):
12 @route('/base_import/set_file')
13- def set_file(self, req, file, import_id, jsonp='callback'):
14+ def set_file(self, file, import_id, jsonp='callback'):
15 import_id = int(import_id)
16
17- written = req.session.model('base_import.import').write(import_id, {
18+ written = request.session.model('base_import.import').write(import_id, {
19 'file': file.read(),
20 'file_name': file.filename,
21 'file_type': file.content_type,
22- }, req.context)
23+ }, request.context)
24
25 return 'window.top.%s(%s)' % (
26 jsonp, simplejson.dumps({'result': written}))

Subscribers

People subscribed via source and target branches

to all changes: