Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hh_ccs
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
贺阳
hh_ccs
Commits
73b812f2
提交
73b812f2
authored
4月 09, 2025
作者:
贺阳
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
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
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
45 行增加
和
43 行删除
+45
-43
export_bl_and_package_xlsx.py
ccs_base/controllers/export_bl_and_package_xlsx.py
+44
-42
cc_package_good_view.xml
ccs_base/views/cc_package_good_view.xml
+1
-1
没有找到文件。
ccs_base/controllers/export_bl_and_package_xlsx.py
浏览文件 @
73b812f2
...
...
@@ -31,7 +31,7 @@ class ExportBlAndPackageXlsx(http.Controller):
if
good_ids
:
for
good_item
in
good_ids
:
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
,
2
,
package_item
.
tracking_no
or
''
)
# 小包追踪号 TRACKING NO
sheet1
.
write
(
good_index
,
3
,
package_item
.
customer_ref
or
''
)
# CUSTOMER REF
...
...
@@ -52,26 +52,27 @@ class ExportBlAndPackageXlsx(http.Controller):
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
,
20
,
package_item
.
receiver_email
or
''
)
# RECEPIENT EMAIL
sheet1
.
write
(
good_index
,
21
,
package_item
.
receiver_phone
or
''
)
# PHONE NUMBER
sheet1
.
write
(
good_index
,
22
,
package_item
.
gross_weight
or
0
)
# GROSS WEIGHT (KG)
sheet1
.
write
(
good_index
,
23
,
package_item
.
weight_unit
or
0
)
# NET WEIGHT (KG)
sheet1
.
write
(
good_index
,
24
,
package_item
.
currency
or
''
)
# Currency
sheet1
.
write
(
good_index
,
25
,
good_item
.
sku_id
or
''
)
# SKU NUMBER
sheet1
.
write
(
good_index
,
26
,
good_item
.
item_name_en
or
''
)
# ITEM DESCRIPTION
sheet1
.
write
(
good_index
,
27
,
good_item
.
export_hs_code
or
''
)
# ITEM HS CODE
sheet1
.
write
(
good_index
,
28
,
good_item
.
quantity
)
# ITEM QUANTITY
sheet1
.
write
(
good_index
,
29
,
good_item
.
quantity_unit
or
''
)
# UNITS
sheet1
.
write
(
good_index
,
30
,
good_item
.
item_total_price
)
# TOTAL VALUE
sheet1
.
write
(
good_index
,
31
,
good_item
.
item_vat
or
''
)
# VAT
sheet1
.
write
(
good_index
,
32
,
''
)
# SKU NUMBER
sheet1
.
write
(
good_index
,
33
,
good_item
.
item_link
or
''
)
# PRODUCT LINK
sheet1
.
write
(
good_index
,
34
,
''
)
# LENGTH
sheet1
.
write
(
good_index
,
35
,
''
)
# WIDTH
sheet1
.
write
(
good_index
,
36
,
''
)
# HEIGHT
sheet1
.
write
(
good_index
,
37
,
package_item
.
receiver_detailed_address
or
''
)
# Detailed Address
sheet1
.
write
(
good_index
,
38
,
package_item
.
next_provider_name
or
''
)
# Last Mile Service Provider 关联的小包的下一个服务商名称
sheet1
.
write
(
good_index
,
39
,
sum
(
package_item
.
good_ids
.
mapped
(
'item_total_price'
)))
# GOODS VALUE 小包上的所有商品的货物总价之和
sheet1
.
write
(
good_index
,
40
,
good_item
.
import_hs_code
or
''
)
# HSCODE IMPORT 取商品上的进口hscode
sheet1
.
write
(
good_index
,
21
,
package_item
.
receiver_detailed_address
or
''
)
# Detailed Address
sheet1
.
write
(
good_index
,
22
,
package_item
.
receiver_phone
or
''
)
# PHONE NUMBER
sheet1
.
write
(
good_index
,
23
,
package_item
.
gross_weight
or
0
)
# GROSS WEIGHT
sheet1
.
write
(
good_index
,
24
,
package_item
.
weight_unit
or
0
)
# Weight Unit
sheet1
.
write
(
good_index
,
25
,
package_item
.
currency
or
''
)
# Currency
sheet1
.
write
(
good_index
,
26
,
good_item
.
item_id
or
''
)
# ITEM ID
sheet1
.
write
(
good_index
,
27
,
good_item
.
sku_id
or
''
)
# SKU NUMBER
sheet1
.
write
(
good_index
,
28
,
good_item
.
item_name_en
or
''
)
# ITEM DESCRIPTION
sheet1
.
write
(
good_index
,
29
,
good_item
.
export_hs_code
or
''
)
# ITEM HS CODE
sheet1
.
write
(
good_index
,
30
,
good_item
.
quantity
)
# ITEM QUANTITY
sheet1
.
write
(
good_index
,
31
,
good_item
.
quantity_unit
or
''
)
# UNITS
sheet1
.
write
(
good_index
,
32
,
good_item
.
item_total_price
)
# TOTAL VALUE
sheet1
.
write
(
good_index
,
33
,
good_item
.
item_vat
or
''
)
# VAT
sheet1
.
write
(
good_index
,
34
,
''
)
# ONLINE SELLING PLACE
sheet1
.
write
(
good_index
,
35
,
good_item
.
item_link
or
''
)
# PRODUCT LINK
sheet1
.
write
(
good_index
,
36
,
''
)
# LENGTH
sheet1
.
write
(
good_index
,
37
,
''
)
# WIDTH
sheet1
.
write
(
good_index
,
38
,
''
)
# HEIGHT
sheet1
.
write
(
good_index
,
39
,
package_item
.
next_provider_name
or
''
)
# Last Mile Service Provider 关联的小包的下一个服务商名称
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
):
num
+=
1
sheet1
=
self
.
get_package_title
(
worksheet
,
font_style
,
num
)
...
...
@@ -87,7 +88,7 @@ class ExportBlAndPackageXlsx(http.Controller):
for
i
in
range
(
41
):
sheet1
.
col
(
i
)
.
width
=
500
*
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
,
2
,
u'TRACKING NO'
,
font_style
)
# TRACKING NO
sheet1
.
write
(
index
,
3
,
u'CUSTOMER REF'
,
font_style
)
# CUSTOMER REF
...
...
@@ -108,26 +109,27 @@ class ExportBlAndPackageXlsx(http.Controller):
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
,
20
,
u'RECEPIENT EMAIL'
,
font_style
)
# RECEPIENT EMAIL
sheet1
.
write
(
index
,
21
,
u'PHONE NUMBER'
,
font_style
)
# PHONE NUMBER
sheet1
.
write
(
index
,
22
,
u'GROSS WEIGHT (KG)'
,
font_style
)
# GROSS WEIGHT (KG)
sheet1
.
write
(
index
,
23
,
u'NET WEIGHT (KG)'
,
font_style
)
# NET WEIGHT (KG)
sheet1
.
write
(
index
,
24
,
u'Currency'
,
font_style
)
# CURRENCY
sheet1
.
write
(
index
,
25
,
u'SKU NUMBER'
,
font_style
)
# SKU NUMBER
sheet1
.
write
(
index
,
26
,
u'ITEM DESCRIPTION'
,
font_style
)
# ITEM DESCRIPTION
sheet1
.
write
(
index
,
27
,
u'ITEM HS CODE'
,
font_style
)
# ITEM HS CODE
sheet1
.
write
(
index
,
28
,
u'ITEM QUANTITY'
,
font_style
)
# ITEM QUANTITY
sheet1
.
write
(
index
,
29
,
u'UNITS'
,
font_style
)
# UNITS
sheet1
.
write
(
index
,
30
,
u'TOTAL VALUE'
,
font_style
)
# TOTAL VALUE
sheet1
.
write
(
index
,
31
,
u'VAT'
,
font_style
)
# VAT
sheet1
.
write
(
index
,
32
,
u'ONLINE SELLING PLACE'
,
font_style
)
# ONLINE SELLING PLACE
sheet1
.
write
(
index
,
33
,
u'PRODUCT LINK'
,
font_style
)
# PRODUCT LINK
sheet1
.
write
(
index
,
34
,
u'LENGTH'
,
font_style
)
# LENGTH
sheet1
.
write
(
index
,
35
,
u'WIDTH'
,
font_style
)
# WIDTH
sheet1
.
write
(
index
,
36
,
u'HEIGHT'
,
font_style
)
# HEIGHT
sheet1
.
write
(
index
,
37
,
u'Detailed Address'
,
font_style
)
# Detailed Address
sheet1
.
write
(
index
,
38
,
u'Last Mile Service Provider'
,
font_style
)
# Last Mile Service Provider
sheet1
.
write
(
index
,
39
,
u'GOODS VALUE'
,
font_style
)
# GOODS VALUE
sheet1
.
write
(
index
,
40
,
u'HSCODE IMPORT'
,
font_style
)
# HSCODE IMPORT
sheet1
.
write
(
index
,
21
,
u'Detailed Address'
,
font_style
)
# Detailed Address
sheet1
.
write
(
index
,
22
,
u'PHONE NUMBER'
,
font_style
)
# PHONE NUMBER
sheet1
.
write
(
index
,
23
,
u'GROSS WEIGHT'
,
font_style
)
# GROSS WEIGHT
sheet1
.
write
(
index
,
24
,
u'Weight Unit'
,
font_style
)
# Weight Unit
sheet1
.
write
(
index
,
25
,
u'Currency'
,
font_style
)
# CURRENCY
sheet1
.
write
(
index
,
26
,
u'ITEM ID'
,
font_style
)
# ITEM ID
sheet1
.
write
(
index
,
27
,
u'SKU NUMBER'
,
font_style
)
# SKU NUMBER
sheet1
.
write
(
index
,
28
,
u'ITEM DESCRIPTION'
,
font_style
)
# ITEM DESCRIPTION
sheet1
.
write
(
index
,
29
,
u'ITEM HS CODE'
,
font_style
)
# ITEM HS CODE
sheet1
.
write
(
index
,
30
,
u'ITEM QUANTITY'
,
font_style
)
# ITEM QUANTITY
sheet1
.
write
(
index
,
31
,
u'UNITS'
,
font_style
)
# UNITS
sheet1
.
write
(
index
,
32
,
u'TOTAL VALUE'
,
font_style
)
# TOTAL VALUE
sheet1
.
write
(
index
,
33
,
u'VAT'
,
font_style
)
# VAT
sheet1
.
write
(
index
,
34
,
u'ONLINE SELLING PLACE'
,
font_style
)
# ONLINE SELLING PLACE
sheet1
.
write
(
index
,
35
,
u'PRODUCT LINK'
,
font_style
)
# PRODUCT LINK
sheet1
.
write
(
index
,
36
,
u'LENGTH'
,
font_style
)
# LENGTH
sheet1
.
write
(
index
,
37
,
u'WIDTH'
,
font_style
)
# WIDTH
sheet1
.
write
(
index
,
38
,
u'HEIGHT'
,
font_style
)
# HEIGHT
sheet1
.
write
(
index
,
39
,
u'Last Mile Service Provider'
,
font_style
)
# Last Mile Service Provider
sheet1
.
write
(
index
,
40
,
u'GOODS VALUE'
,
font_style
)
# GOODS VALUE
sheet1
.
write
(
index
,
41
,
u'HSCODE IMPORT'
,
font_style
)
# HSCODE IMPORT
return
sheet1
# 运单导出包裹清关数据 每个运单导出一个文件 生成压缩包
...
...
ccs_base/views/cc_package_good_view.xml
浏览文件 @
73b812f2
...
...
@@ -10,7 +10,7 @@
<field
name=
"arch"
type=
"xml"
>
<tree
string=
"Package Good"
decoration-warning=
"is_cancel==True"
>
<!-- # 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=
"item_name_en"
string=
"Name EN"
/>
<field
optional=
"show"
name=
"item_name_cn"
string=
"Name CN"
/>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论