Hi everyone i have module 'cnd_quotations',now i have code :
def exportexcel(self,req,salecorder,server):
now = datetime.datetime.now()
now.hour
now.year
now.day
now.month
#workbook = xlsxwriter.Workbook("/cnd_quotations/static/src/data/"+str(now.day)+"_"+str(now.month)+"_"+str(now.year)+"_"+str(salecorder)+'.xlsx')
workbook = xlsxwriter.Workbook("openerp/addons/cnd_quotations/static/src/data/"+str(now.day)+"_"+str(now.month)+"_"+str(now.year)+"_"+str(salecorder)+'.xlsx')
worksheet = workbook.add_worksheet()
worksheet.set_column('A:A', 20)
bold = workbook.add_format({'bold': True})
worksheet.write('A1', 'Sale order code')
worksheet.write(0, 1, 123)
cookie_db = req.httprequest.cookies.get('last_used_database')
resgister=RegistryManager.get(cookie_db)
with resgister.cursor() as cr:
cp=resgister.get('cvs.quoations.chitiet.dichvu.tigia')
cp_search=cp.read(cr,SUPERUSER_ID,cp.search(cr,SUPERUSER_ID,[('saleorder','=',str(salecorder))]),[])
for item in cp_search:
worksheet.write('A5', str('Giá Nhôm Thá» TrÆ°á»ng (USD)').decode('utf-8'), bold)
worksheet.write(5, 0, item['gianhomthitruong'])
worksheet.write('B5', str('Tá» Giá(VNÄ)').decode('utf-8'), bold)
worksheet.write(5, 1, item['tigia'])
worksheet.write('C5', str('Tá» Lá»').decode('utf-8'), bold)
worksheet.write(5, 2, item['tile'])
cp1=resgister.get('cvs.quoations.baogia.new.nhom')
cp_search1=cp1.read(cr,SUPERUSER_ID,cp1.search(cr,SUPERUSER_ID,[('saleorder','=',str(salecorder))]),[])
worksheet.write('A9', str('Hạng Mục').decode('utf-8'), bold)
worksheet.write('B9', str('Chiá»u Rá»ng(mm)').decode('utf-8'), bold)
worksheet.write('C9', str('Chiá»u Cao(mm)').decode('utf-8'), bold)
worksheet.write('D9', str('SỠLượng').decode('utf-8'), bold)
worksheet.write('E9', str('ÄVT').decode('utf-8'), bold)
worksheet.write('F9', str('Dá»ch Vụ').decode('utf-8'), bold)
worksheet.write('G9', str('Trá»ng Lượng').decode('utf-8'), bold)
worksheet.write('H9', str('ÄÆ¡n Giá').decode('utf-8'), bold)
worksheet.write('I9', str('Thà nh Tiá»n').decode('utf-8'), bold)
_icr=10;
for item1 in cp_search1:
worksheet.write(_icr,0,item1['tennhom'])
worksheet.write(_icr, 1, item1['chieurong'])
worksheet.write(_icr, 2, item1['chieucao'])
worksheet.write(_icr, 3, item1['soluong'])
worksheet.write(_icr, 4, item1['dvt'])
#worksheet.write(5, 5, item['tile'])
worksheet.write(_icr, 6, item1['trongluong'])
worksheet.write(_icr, 7, item1['dongia'])
worksheet.write(_icr, 8, item1['thanhtien'])
_icr=_icr+1
cp2=resgister.get('cvs.quoations.baogia.new.kinh')
cp_search2=cp2.read(cr,SUPERUSER_ID,cp2.search(cr,SUPERUSER_ID,[('saleorder','=',str(salecorder))]),[])
worksheet.write('A'+str((_icr+2)), str('KÃnh').decode('utf-8'), bold)
worksheet.write('B'+str((_icr+2)), str('Chiá»u Rá»ng(mm)').decode('utf-8'), bold)
worksheet.write('C'+str((_icr+2)), str('Chiá»u Cao(mm)').decode('utf-8'), bold)
worksheet.write('D'+str((_icr+2)), str('ÄVT').decode('utf-8'), bold)
worksheet.write('E'+str((_icr+2)), str('Dá»ch Vụ').decode('utf-8'), bold)
worksheet.write('F'+str((_icr+2)), str('ÄÆ¡n Giá').decode('utf-8'), bold)
worksheet.write('G'+str((_icr+2)), str('Thà nh Tiá»n').decode('utf-8'), bold)
_ho=_icr+3
for item2 in cp_search2:
worksheet.write(_ho,0,item2['tenkinh'])
worksheet.write(_ho, 1, item2['chieurong'])
worksheet.write(_ho, 2, item2['chieucao'])
worksheet.write(_ho, 3, item2['dvt'])
#worksheet.write(5, 5, item['tile'])
worksheet.write(_ho, 4, item2['dongia'])
worksheet.write(_ho, 5, item2['thanhtien'])
cp3=resgister.get('cvs.quoations.baogia.new.phukien')
cp_search3=cp3.read(cr,SUPERUSER_ID,cp3.search(cr,SUPERUSER_ID,[('saleorder','=',str(salecorder))]),[])
worksheet.write('A'+str((_ho+2)), str('Tên Phụ Kiá»n').decode('utf-8'), bold)
worksheet.write('B'+str((_ho+2)), str('SỠLượng)').decode('utf-8'), bold)
worksheet.write('C'+str((_ho+2)), str('ÄVT').decode('utf-8'), bold)
worksheet.write('F'+str((_ho+2)), str('ÄÆ¡n Giá').decode('utf-8'), bold)
worksheet.write('G'+str((_ho+2)), str('Thà nh Tiá»n').decode('utf-8'), bold)
_ko=_ho+3
for item3 in cp_search3:
worksheet.write(_ko,0,item3['tenphukien'])
worksheet.write(_ko, 1, item3['soluong'])
worksheet.write(_ko, 2, item3['dvt'])
worksheet.write(_ko, 4, item3['dongia'])
worksheet.write(_ko, 5, item3['thanhtien'])
workbook.close()
but error "Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided"
can you help me?