Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

2

Import cvs file does not work, buttons stay grey

By
Arjan Rosman
on 3/20/14, 11:58 AM 2,881 views

When I try to import a csv file Sales - sales/ customers (listview) the buttons "Validate" and "Import" stay grey instead of red after I have selected my csv file.

I have installed trunk (v8) on ubuntu 13.10 in a vmware 64 bits

If you make a fake record in OpenERP, export it, delete it in OpenERP and then reimport the exported file, do the buttons still stay greyed out?

Martin
on 3/21/14, 2:49 PM

Yes, I have create a customer, exported that customer, deleted him and reimported te export file. Buttons still stay grey.

Arjan Rosman
on 3/21/14, 7:09 PM

I do have the same issue. Tried with products, contacts and no luck.

Christian Parent
on 4/5/14, 2:32 PM

It is a bug in the base.import module, when you select a file to import, it will throw an error. Would post it on the launchpad but did not found how. Here is the text of the error thrown:

Christian Parent
on 4/5/14, 11:16 PM

2014-04-06 01:11:44,818 1573 ERROR EKYRAIL werkzeug: Error on request: Traceback (most recent call last): ....... File "/usr/share/pyshared/openerp/http.py", line 292, in checked_call return self.endpoint(a, *kw) File "/usr/share/pyshared/openerp/http.py", line 635, in __call__ return self.method(args, *kw) File "/usr/share/pyshared/openerp/http.py", line 338, in response_wrap response = f(args, *kw) TypeError: set_file() takes at least 4 arguments (4 given)

Christian Parent
on 4/5/14, 11:19 PM
0
parag
On 7/18/14, 12:05 PM

This issue can be resolved by making changes in addons/base_import/controller.py file and upgrading base_import module.

___________________________________

import simplejson
from openerp.http import Controller, route, request

class ImportController(Controller):
     @route('/base_import/set_file')
     def set_file(self, file, import_id, jsonp='callback'):
         import_id = int(import_id)

         written = request.session.model('base_import.import').write(import_id, {
             'file': file.read(),
             'file_name': file.filename,
             'file_type': file.content_type,
         }, request.context)

         return 'window.top.%s(%s)' % (
             jsonp, simplejson.dumps({'result': written}))

 

----------------------------------------

 

0

I use the online odoo version and my .csv seems well prepared (based on product export from Odoo which did work) but nothing happens after pressing the load button. A popup with the text "loading" shows up for a couple of seconds but afterwards the imported products are not available.

 

 

0
Christian Parent
On 4/7/14, 3:06 PM

A patch exist for it : bugs.launchpad.net/openobject-addons/+bug/1302815/+attachment/4072225/+files/controller.patch

See this bug report : bugs.launchpad.net/openobject-addons/+bug/1302815

0
patrick-peng
On 4/9/14, 1:36 PM

Finally, how to solve it?

If you know how to edit a python script ( .py ) and how to update modules in openerp, you can use the link I have posted above. Else, you will have to wait for them to fix it and put it in a nightly.

Christian Parent
on 4/9/14, 6:57 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

3 follower(s)

Stats

Asked: 3/20/14, 11:58 AM
Seen: 2881 times
Last updated: 3/16/15, 8:10 AM