提交 73b812f2 authored 作者: 贺阳's avatar 贺阳

1.第一个ITEM ID改成CUSTOMS PROVIDER ORDER ID

2.GROSS WEIGHT (KG)改为GROSS WEIGHT ,去掉单位 3.NET WEIGHT (KG)改成Weight Unit 4.导出的表格将Detailed Address改放在RECEPIENT EMAIL后 5.导出的表格新增ITEM ID,放在SKU NUMBER前方,取推过来的字段小包商品id;
上级 a0843550
...@@ -31,7 +31,7 @@ class ExportBlAndPackageXlsx(http.Controller): ...@@ -31,7 +31,7 @@ class ExportBlAndPackageXlsx(http.Controller):
if good_ids: if good_ids:
for good_item in good_ids: for good_item in good_ids:
good_index += 1 good_index += 1
sheet1.write(good_index, 0, package_item.logistic_order_no or '') # 物流订单号 ITEM ID sheet1.write(good_index, 0, package_item.logistic_order_no or '') # 物流订单号 CUSTOMS PROVIDER ORDER ID
sheet1.write(good_index, 1, package_item.big_package_id.big_package_no or '') # 小包商品对应的大包号 BIG BAG NO sheet1.write(good_index, 1, package_item.big_package_id.big_package_no or '') # 小包商品对应的大包号 BIG BAG NO
sheet1.write(good_index, 2, package_item.tracking_no or '') # 小包追踪号 TRACKING NO sheet1.write(good_index, 2, package_item.tracking_no or '') # 小包追踪号 TRACKING NO
sheet1.write(good_index, 3, package_item.customer_ref or '') # CUSTOMER REF sheet1.write(good_index, 3, package_item.customer_ref or '') # CUSTOMER REF
...@@ -52,26 +52,27 @@ class ExportBlAndPackageXlsx(http.Controller): ...@@ -52,26 +52,27 @@ class ExportBlAndPackageXlsx(http.Controller):
sheet1.write(good_index, 18, package_item.receiver_county or '') # RECEIPIENT COUNTY sheet1.write(good_index, 18, package_item.receiver_county or '') # RECEIPIENT COUNTY
sheet1.write(good_index, 19, package_item.receiver_postcode or '') # RECEIPIENT POSTCODE sheet1.write(good_index, 19, package_item.receiver_postcode or '') # RECEIPIENT POSTCODE
sheet1.write(good_index, 20, package_item.receiver_email or '') # RECEPIENT EMAIL sheet1.write(good_index, 20, package_item.receiver_email or '') # RECEPIENT EMAIL
sheet1.write(good_index, 21, package_item.receiver_phone or '') # PHONE NUMBER sheet1.write(good_index, 21, package_item.receiver_detailed_address or '') # Detailed Address
sheet1.write(good_index, 22, package_item.gross_weight or 0) # GROSS WEIGHT (KG) sheet1.write(good_index, 22, package_item.receiver_phone or '') # PHONE NUMBER
sheet1.write(good_index, 23, package_item.weight_unit or 0) # NET WEIGHT (KG) sheet1.write(good_index, 23, package_item.gross_weight or 0) # GROSS WEIGHT
sheet1.write(good_index, 24, package_item.currency or '') # Currency sheet1.write(good_index, 24, package_item.weight_unit or 0) # Weight Unit
sheet1.write(good_index, 25, good_item.sku_id or '') # SKU NUMBER sheet1.write(good_index, 25, package_item.currency or '') # Currency
sheet1.write(good_index, 26, good_item.item_name_en or '') # ITEM DESCRIPTION sheet1.write(good_index, 26, good_item.item_id or '') # ITEM ID
sheet1.write(good_index, 27, good_item.export_hs_code or '') # ITEM HS CODE sheet1.write(good_index, 27, good_item.sku_id or '') # SKU NUMBER
sheet1.write(good_index, 28, good_item.quantity) # ITEM QUANTITY sheet1.write(good_index, 28, good_item.item_name_en or '') # ITEM DESCRIPTION
sheet1.write(good_index, 29, good_item.quantity_unit or '') # UNITS sheet1.write(good_index, 29, good_item.export_hs_code or '') # ITEM HS CODE
sheet1.write(good_index, 30, good_item.item_total_price) # TOTAL VALUE sheet1.write(good_index, 30, good_item.quantity) # ITEM QUANTITY
sheet1.write(good_index, 31, good_item.item_vat or '') # VAT sheet1.write(good_index, 31, good_item.quantity_unit or '') # UNITS
sheet1.write(good_index, 32, '') # SKU NUMBER sheet1.write(good_index, 32, good_item.item_total_price) # TOTAL VALUE
sheet1.write(good_index, 33, good_item.item_link or '') # PRODUCT LINK sheet1.write(good_index, 33, good_item.item_vat or '') # VAT
sheet1.write(good_index, 34, '') # LENGTH sheet1.write(good_index, 34, '') # ONLINE SELLING PLACE
sheet1.write(good_index, 35, '') # WIDTH sheet1.write(good_index, 35, good_item.item_link or '') # PRODUCT LINK
sheet1.write(good_index, 36, '') # HEIGHT sheet1.write(good_index, 36, '') # LENGTH
sheet1.write(good_index, 37, package_item.receiver_detailed_address or '') # Detailed Address sheet1.write(good_index, 37, '') # WIDTH
sheet1.write(good_index, 38, package_item.next_provider_name or '') # Last Mile Service Provider 关联的小包的下一个服务商名称 sheet1.write(good_index, 38, '') # HEIGHT
sheet1.write(good_index, 39, sum(package_item.good_ids.mapped('item_total_price'))) # GOODS VALUE 小包上的所有商品的货物总价之和 sheet1.write(good_index, 39, package_item.next_provider_name or '') # Last Mile Service Provider 关联的小包的下一个服务商名称
sheet1.write(good_index, 40, good_item.import_hs_code or '') # HSCODE IMPORT 取商品上的进口hscode sheet1.write(good_index, 40, sum(package_item.good_ids.mapped('item_total_price'))) # GOODS VALUE 小包上的所有商品的货物总价之和
sheet1.write(good_index, 41, good_item.import_hs_code or '') # HSCODE IMPORT 取商品上的进口hscode
if good_index == int(parcel_export_num): if good_index == int(parcel_export_num):
num += 1 num += 1
sheet1 = self.get_package_title(worksheet, font_style, num) sheet1 = self.get_package_title(worksheet, font_style, num)
...@@ -87,7 +88,7 @@ class ExportBlAndPackageXlsx(http.Controller): ...@@ -87,7 +88,7 @@ class ExportBlAndPackageXlsx(http.Controller):
for i in range(41): for i in range(41):
sheet1.col(i).width = 500 * 11 sheet1.col(i).width = 500 * 11
sheet1.col(8).width = 600 * 11 sheet1.col(8).width = 600 * 11
sheet1.write(index, 0, u'ITEM ID', font_style) # ITEM ID sheet1.write(index, 0, u'CUSTOMS PROVIDER ORDER ID ', font_style) # CUSTOMS PROVIDER ORDER ID
sheet1.write(index, 1, u'BIG BAG NO', font_style) # BIG BAG NO sheet1.write(index, 1, u'BIG BAG NO', font_style) # BIG BAG NO
sheet1.write(index, 2, u'TRACKING NO', font_style) # TRACKING NO sheet1.write(index, 2, u'TRACKING NO', font_style) # TRACKING NO
sheet1.write(index, 3, u'CUSTOMER REF', font_style) # CUSTOMER REF sheet1.write(index, 3, u'CUSTOMER REF', font_style) # CUSTOMER REF
...@@ -108,26 +109,27 @@ class ExportBlAndPackageXlsx(http.Controller): ...@@ -108,26 +109,27 @@ class ExportBlAndPackageXlsx(http.Controller):
sheet1.write(index, 18, u'RECEIPIENT COUNTY', font_style) # RECEIPIENT COUNTY sheet1.write(index, 18, u'RECEIPIENT COUNTY', font_style) # RECEIPIENT COUNTY
sheet1.write(index, 19, u'RECEIPIENT POSTCODE', font_style) # RECEIPIENT POSTCODE sheet1.write(index, 19, u'RECEIPIENT POSTCODE', font_style) # RECEIPIENT POSTCODE
sheet1.write(index, 20, u'RECEPIENT EMAIL', font_style) # RECEPIENT EMAIL sheet1.write(index, 20, u'RECEPIENT EMAIL', font_style) # RECEPIENT EMAIL
sheet1.write(index, 21, u'PHONE NUMBER', font_style) # PHONE NUMBER sheet1.write(index, 21, u'Detailed Address', font_style) # Detailed Address
sheet1.write(index, 22, u'GROSS WEIGHT (KG)', font_style) # GROSS WEIGHT (KG) sheet1.write(index, 22, u'PHONE NUMBER', font_style) # PHONE NUMBER
sheet1.write(index, 23, u'NET WEIGHT (KG)', font_style) # NET WEIGHT (KG) sheet1.write(index, 23, u'GROSS WEIGHT', font_style) # GROSS WEIGHT
sheet1.write(index, 24, u'Currency', font_style) # CURRENCY sheet1.write(index, 24, u'Weight Unit', font_style) # Weight Unit
sheet1.write(index, 25, u'SKU NUMBER', font_style) # SKU NUMBER sheet1.write(index, 25, u'Currency', font_style) # CURRENCY
sheet1.write(index, 26, u'ITEM DESCRIPTION', font_style) # ITEM DESCRIPTION sheet1.write(index, 26, u'ITEM ID', font_style) # ITEM ID
sheet1.write(index, 27, u'ITEM HS CODE', font_style) # ITEM HS CODE sheet1.write(index, 27, u'SKU NUMBER', font_style) # SKU NUMBER
sheet1.write(index, 28, u'ITEM QUANTITY', font_style) # ITEM QUANTITY sheet1.write(index, 28, u'ITEM DESCRIPTION', font_style) # ITEM DESCRIPTION
sheet1.write(index, 29, u'UNITS', font_style) # UNITS sheet1.write(index, 29, u'ITEM HS CODE', font_style) # ITEM HS CODE
sheet1.write(index, 30, u'TOTAL VALUE', font_style) # TOTAL VALUE sheet1.write(index, 30, u'ITEM QUANTITY', font_style) # ITEM QUANTITY
sheet1.write(index, 31, u'VAT', font_style) # VAT sheet1.write(index, 31, u'UNITS', font_style) # UNITS
sheet1.write(index, 32, u'ONLINE SELLING PLACE', font_style) # ONLINE SELLING PLACE sheet1.write(index, 32, u'TOTAL VALUE', font_style) # TOTAL VALUE
sheet1.write(index, 33, u'PRODUCT LINK', font_style) # PRODUCT LINK sheet1.write(index, 33, u'VAT', font_style) # VAT
sheet1.write(index, 34, u'LENGTH', font_style) # LENGTH sheet1.write(index, 34, u'ONLINE SELLING PLACE', font_style) # ONLINE SELLING PLACE
sheet1.write(index, 35, u'WIDTH', font_style) # WIDTH sheet1.write(index, 35, u'PRODUCT LINK', font_style) # PRODUCT LINK
sheet1.write(index, 36, u'HEIGHT', font_style) # HEIGHT sheet1.write(index, 36, u'LENGTH', font_style) # LENGTH
sheet1.write(index, 37, u'Detailed Address', font_style) # Detailed Address sheet1.write(index, 37, u'WIDTH', font_style) # WIDTH
sheet1.write(index, 38, u'Last Mile Service Provider', font_style) # Last Mile Service Provider sheet1.write(index, 38, u'HEIGHT', font_style) # HEIGHT
sheet1.write(index, 39, u'GOODS VALUE', font_style) # GOODS VALUE sheet1.write(index, 39, u'Last Mile Service Provider', font_style) # Last Mile Service Provider
sheet1.write(index, 40, u'HSCODE IMPORT', font_style) # HSCODE IMPORT sheet1.write(index, 40, u'GOODS VALUE', font_style) # GOODS VALUE
sheet1.write(index, 41, u'HSCODE IMPORT', font_style) # HSCODE IMPORT
return sheet1 return sheet1
# 运单导出包裹清关数据 每个运单导出一个文件 生成压缩包 # 运单导出包裹清关数据 每个运单导出一个文件 生成压缩包
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="Package Good" decoration-warning="is_cancel==True"> <tree string="Package Good" decoration-warning="is_cancel==True">
<!-- # decoration-muted="opening_debit == 0 and opening_credit == 0" 根据条件显示每行的颜色 muted--> <!-- # decoration-muted="opening_debit == 0 and opening_credit == 0" 根据条件显示每行的颜色 muted-->
<field optional="hide" name="item_id" string="Item ID"/> <field optional="show" name="item_id" string="Item ID"/>
<field optional="show" name="sku_id" string="SKU ID"/> <field optional="show" name="sku_id" string="SKU ID"/>
<field optional="show" name="item_name_en" string="Name EN"/> <field optional="show" name="item_name_en" string="Name EN"/>
<field optional="show" name="item_name_cn" string="Name CN"/> <field optional="show" name="item_name_cn" string="Name CN"/>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论