Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4 Trả lời
9168 Lượt xem

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

Ảnh đại diện
Huỷ bỏ

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?

Tác giả

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

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

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:

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)

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Finally, how to solve it?

Ảnh đại diện
Huỷ bỏ

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.

Câu trả lời hay nhất

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.

 

 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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}))

 

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

 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 15
3500
5
thg 7 20
6810
1
thg 11 16
3671
1
thg 6 16
7672
0
thg 7 15
3970