Hi,
i have uploaded an csv file into a wizard, and how i access the values in the csv file from the BINARY FIELD. please help!
Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
1
Trả lời
9431
Lượt xem
Hi,
If you are looking to read a csv file you can try the following code
csv_data = base64.b64decode('your binary field')
data_file = io.StringIO(csv_data.decode("utf-8"))
data_file.seek(0)
file_reader = []
csv_reader = csv.reader(data_file, delimiter=',')
file_reader.extend(csv_reader)
in the above code the data will be in file_reader
Regards
Thanks for the reply, can i read .xls with above method?
Hi,
Take a look at following forum post
https://www.odoo.com/forum/help-1/question/how-to-read-values-from-xls-file-143993
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký