Hi;
how to create button and method to import Excel file?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi;
how to create button and method to import Excel file?
Xml
<button name="import_xls" string="Import" type="object" />
Py
import base64
import xlrd
xls_file = fields.Binary('File')
def import_xls(self):
wb = xlrd.open_workbook(file_contents=base64.decodestring(self.xls_file))
for sheet in wb.sheets():
for row in range(sheet.nrows):
for col in range(sheet.ncols):
print (sheet.cell(row,col).value)
If helpful you , upvote this.
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
AanmeldenGerelateerde posts | Antwoorden | Weergaven | Activiteit | |
---|---|---|---|---|
|
2
sep. 23
|
1310 | ||
|
1
jul. 18
|
4283 | ||
|
0
mrt. 15
|
3910 | ||
|
0
nov. 24
|
3883 | ||
Import Sales Orders Status
Opgelost
|
|
2
nov. 24
|
1169 |