Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I want to create a custom page to let user send the file to server.
After receiving the file, openerp will create records into the database base on the value in the file
what should I do?
If you want to import function, first clear which file extension are use for data like .CSV or .XLS.
anyways, you have to create a function and read the data from .CSV or .XLS file.
from xlrd import open_workbook
def import_data(self, cr, uid, ids, context=None):
temp_path = tempfile.gettempdir()
test_obj = self.pool.get('test.test')
xls_data = base64.decodestring(xls_file)
wb = open_workbook(temp_path+'/xsl_file.xls')
for sheet in wb.sheets():
for rownum in range(sheet.nrows):
if rownum == 0:
header_list = sheet.row_values(rownum)
Hope this will help you alot
About This Community
This platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 1/16/15, 1:54 AM|
|Seen: 2238 times|
|Last updated: 4/30/15, 1:32 AM|