Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hh_ccs
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
贺阳
hh_ccs
Commits
1e000827
提交
1e000827
authored
12月 17, 2025
作者:
贺阳
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改为货运提货pod
上级
2e92ab17
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
79 行增加
和
65 行删除
+79
-65
zh_CN.po
ccs_base/i18n/zh_CN.po
+36
-32
cc_bill_loading.py
ccs_base/models/cc_bill_loading.py
+16
-4
cc_bl_view.xml
ccs_base/views/cc_bl_view.xml
+3
-3
batch_get_pod_info_wizard.py
ccs_base/wizard/batch_get_pod_info_wizard.py
+24
-26
没有找到文件。
ccs_base/i18n/zh_CN.po
浏览文件 @
1e000827
...
...
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-12-1
6 08:30
+0000\n"
"PO-Revision-Date: 2025-12-1
6 16:32
+0800\n"
"POT-Creation-Date: 2025-12-1
7 02:03
+0000\n"
"PO-Revision-Date: 2025-12-1
7 10:05
+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: zh_CN\n"
...
...
@@ -606,31 +606,28 @@ msgstr "批量创建提单"
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_create_and_get_pod_info_wizard_form
msgid "Batch Create and Get POD Info"
msgstr "批量创建提单并获取
尾程
POD信息"
msgstr "批量创建提单并获取
货站提货
POD信息"
#. module: ccs_base
#: model:ir.actions.server,name:ccs_base.bl_download_delivery_pod_server_action
msgid "Batch Download
Delivery
POD"
msgid "Batch Download
Last Mile
POD"
msgstr "批量下载尾程快递POD"
#. module: ccs_base
#: model:ir.actions.server,name:ccs_base.bl_download_pod_server_action
msgid "Batch Download PickUp POD"
msgstr "批量下载货站提货POD"
#. module: ccs_base
#: model:ir.actions.server,name:ccs_base.bl_get_delivery_pod_info_server_action
msgid "Batch Get Delivery POD Info"
msgstr "批量获取尾程快递POD信息"
#. odoo-python
#: code:addons/ccs_base/models/cc_bill_loading.py:0 model:ir.actions.server,name:ccs_base.bl_get_delivery_pod_info_server_action
#, python-format
msgid "Batch Get Last Mile POD Info"
msgstr "获取尾程快递POD"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/
models/cc_bill_loading.py:0 code:addons/ccs_base/
wizard/batch_get_pod_info_wizard.py:0
#: code:addons/ccs_base/wizard/batch_get_pod_info_wizard.py:0
#: model:ir.actions.act_window,name:ccs_base.action_batch_get_pod_info_wizard
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_get_pod_info_wizard_form
#, python-format
msgid "Batch Get POD Info"
msgstr "批量获取
尾程
POD"
msgstr "批量获取
货站提货
POD"
#. module: ccs_base
#: model:ir.model,name:ccs_base.model_batch_get_pod_info_wizard
...
...
@@ -638,7 +635,9 @@ msgid "Batch Get POD Info Wizard"
msgstr "批量获取POD向导"
#. module: ccs_base
#: model:ir.actions.server,name:ccs_base.bl_get_pod_info_server_action
#. odoo-python
#: code:addons/ccs_base/models/cc_bill_loading.py:0 model:ir.actions.server,name:ccs_base.bl_get_pod_info_server_action
#, python-format
msgid "Batch Get PickUp POD Info"
msgstr "批量获取货站提货POD"
...
...
@@ -647,6 +646,11 @@ msgstr "批量获取货站提货POD"
msgid "Batch Link Transfer B/L No"
msgstr "批量关联转单号"
#. module: ccs_base
#: model:ir.actions.server,name:ccs_base.bl_download_pod_server_action
msgid "Batch PickUp Download POD"
msgstr "批量下载货站提货POD"
#. module: ccs_base
#: model:ir.model,name:ccs_base.model_batch_update_transfer_bl_no_wizard
msgid "Batch Update Transfer B/L No Wizard"
...
...
@@ -1634,8 +1638,8 @@ msgstr "毛重(公斤)"
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__get_last_mile_pod
msgid "Get
Last Mile
POD"
msgstr "获取
尾程
POD"
msgid "Get
PickUp
POD"
msgstr "获取
货站提货
POD"
#. module: ccs_base
#: model:ir.model.fields.selection,name:ccs_base.selection__cc_history_package_good__item_type__gift
...
...
@@ -2756,15 +2760,15 @@ msgstr "请检查导入文件和内容是否正确,请根据模板文件导入
#. odoo-python
#: code:addons/ccs_base/models/cc_bill_loading.py:0
#, python-format
msgid "Please configure
the default customs clearance status of the bill of loading node type
first."
msgstr "
请先配置默认的提单节点类型的清关节点
"
msgid "Please configure
%s file of the bill of loading
first."
msgstr ""
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/models/cc_bill_loading.py:0
#, python-format
msgid "Please configure the
tail-end handover POD file of the bill of loading
first."
msgstr "请先配置
提单的尾部交接POD文件。
"
msgid "Please configure the
default customs clearance status of the bill of loading node type
first."
msgstr "请先配置
默认的提单节点类型的清关节点
"
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_create_and_get_pod_info_wizard_form
...
...
@@ -3428,11 +3432,6 @@ msgstr ""
msgid "Submit"
msgstr "提交"
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__sync_last_mile_pod
msgid "Sync Last Mile POD"
msgstr "同步尾程POD"
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_history_ship_package_view
msgid "Sync Log"
...
...
@@ -3443,6 +3442,11 @@ msgstr "同步日志"
msgid "Sync Logs"
msgstr "同步日志"
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__sync_last_mile_pod
msgid "Sync PickUp POD"
msgstr "同步货站提货POD"
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__sync_match_node
msgid "Sync Push Match Node"
...
...
@@ -3478,7 +3482,7 @@ msgstr "TEMU 平台"
#. odoo-python
#: code:addons/ccs_base/models/cc_bill_loading.py:0
#, python-format
msgid "TEMU提单不支持获取
尾程
POD信息,请点击批量创建提单!"
msgid "TEMU提单不支持获取
货站提货
POD信息,请点击批量创建提单!"
msgstr ""
#. module: ccs_base
...
...
@@ -4006,7 +4010,7 @@ msgstr "是否分大包导出"
#. module: ccs_base
#: model:ir.model.fields,help:ccs_base.field_batch_get_pod_info_wizard__get_last_mile_pod
msgid "Whether to get
last mile
POD information"
msgid "Whether to get
pickup
POD information"
msgstr ""
#. module: ccs_base
...
...
@@ -4026,7 +4030,7 @@ msgstr "是否同步推送匹配节点信息"
#. module: ccs_base
#: model:ir.model.fields,help:ccs_base.field_batch_get_pod_info_wizard__sync_last_mile_pod
msgid "Whether to sync
last mile
POD information"
msgid "Whether to sync
pickup
POD information"
msgstr "是否同步尾程POD信息"
#. module: ccs_base
...
...
@@ -4195,7 +4199,7 @@ msgstr ""
#. module: ccs_base
#: model:ir.model.fields,help:ccs_base.field_batch_get_pod_info_wizard__sync_successful_processed
msgid "勾选后显示同步
尾程
POD和同步匹配节点的字段以及确定按钮"
msgid "勾选后显示同步
货站提货
POD和同步匹配节点的字段以及确定按钮"
msgstr ""
#. module: ccs_base
...
...
@@ -4350,8 +4354,8 @@ msgid "自动获取尾程POD"
msgstr ""
#. module: ccs_base
#: model:ir.model.fields.selection,name:ccs_base.selection__batch_get_pod_info_wizard__action_type__获取
尾程
pod信息
msgid "获取
尾程
POD信息"
#: model:ir.model.fields.selection,name:ccs_base.selection__batch_get_pod_info_wizard__action_type__获取
货站提货
pod信息
msgid "获取
货站提货
POD信息"
msgstr ""
#. module: ccs_base
...
...
ccs_base/models/cc_bill_loading.py
浏览文件 @
1e000827
...
...
@@ -1243,12 +1243,24 @@ class CcBL(models.Model):
}
def
action_batch_get_pod_info
(
self
):
"""批量获取
尾程
POD信息"""
"""批量获取
货站提货
POD信息"""
is_temp
=
self
.
filtered
(
lambda
x
:
x
.
bl_type
==
'temu'
)
if
is_temp
:
raise
ValidationError
(
_
(
'TEMU提单不支持获取尾程POD信息,请点击批量创建提单!'
))
raise
ValidationError
(
_
(
'TEMU提单不支持获取货站提货POD信息,请点击批量创建提单!'
))
return
{
'name'
:
_
(
'Batch Get PickUp POD Info'
),
'type'
:
'ir.actions.act_window'
,
'view_mode'
:
'form'
,
'res_model'
:
'batch.get.pod.info.wizard'
,
'context'
:
{
'active_id'
:
self
.
ids
,
'default_action_type'
:
'获取货站提货POD信息'
},
'views'
:
[[
self
.
env
.
ref
(
'ccs_base.view_batch_get_pod_info_wizard_form'
)
.
id
,
"form"
]],
'target'
:
'new'
,
}
def
action_batch_get_last_mile_pod_info
(
self
):
"""批量获取尾程POD信息"""
return
{
'name'
:
_
(
'Batch Get POD Info'
),
'name'
:
_
(
'Batch Get
Last Mile
POD Info'
),
'type'
:
'ir.actions.act_window'
,
'view_mode'
:
'form'
,
'res_model'
:
'batch.get.pod.info.wizard'
,
...
...
@@ -1282,7 +1294,7 @@ class CcBL(models.Model):
has_files
=
self
.
env
[
'cc.clearance.file'
]
.
search_count
(
[(
'bl_id'
,
'in'
,
self
.
ids
),
(
'file_name'
,
'='
,
pod_name
),
(
'file'
,
'!='
,
False
)])
if
not
has_files
:
raise
UserError
(
_
(
'Please configure
the tail-end handover POD file of the bill of loading first.'
)
)
raise
UserError
(
_
(
'Please configure
%
s file of the bill of loading first.'
),
pod_name
)
return
self
.
action_download_pod
(
pod_name
)
...
...
ccs_base/views/cc_bl_view.xml
浏览文件 @
1e000827
...
...
@@ -428,7 +428,7 @@
<!-- 获取尾程快递POD -->
<record
id=
"bl_get_delivery_pod_info_server_action"
model=
"ir.actions.server"
>
<field
name=
"name"
>
Batch Get
Delivery
POD Info
</field>
<field
name=
"name"
>
Batch Get
Last Mile
POD Info
</field>
<field
name=
"model_id"
ref=
"model_cc_bl"
/>
<field
name=
"binding_model_id"
ref=
"model_cc_bl"
/>
<field
name=
"state"
>
code
</field>
...
...
@@ -436,7 +436,7 @@
<field
name=
"groups_id"
eval=
"[(4, ref('ccs_base.group_clearance_of_customs_user'))]"
/>
<field
name=
"code"
>
if records:
action = records.action_batch_get_pod_info()
action = records.action_batch_get_
last_mile_
pod_info()
</field>
</record>
...
...
@@ -456,7 +456,7 @@
<!-- 下载尾程交接POD -->
<record
id=
"bl_download_delivery_pod_server_action"
model=
"ir.actions.server"
>
<field
name=
"name"
>
Batch Download
Delivery
POD
</field>
<field
name=
"name"
>
Batch Download
Last Mile
POD
</field>
<field
name=
"model_id"
ref=
"model_cc_bl"
/>
<field
name=
"binding_model_id"
ref=
"model_cc_bl"
/>
<field
name=
"state"
>
code
</field>
...
...
ccs_base/wizard/batch_get_pod_info_wizard.py
浏览文件 @
1e000827
...
...
@@ -19,7 +19,7 @@ _logger = logging.getLogger(__name__)
class
BatchGetPodInfoWizard
(
models
.
TransientModel
):
_name
=
'batch.get.pod.info.wizard'
_description
=
'Batch Get POD Info Wizard'
# 批量获取POD信息向导
_description
=
'Batch Get POD Info Wizard'
# 批量获取
货站提货
POD信息向导
def
get_order
(
self
):
"""
...
...
@@ -32,9 +32,9 @@ class BatchGetPodInfoWizard(models.TransientModel):
return
self
.
env
[
'cc.bl'
]
.
browse
(
order_id
)
action_type
=
fields
.
Selection
([
(
'获取
尾程POD信息'
,
'获取尾程
POD信息'
),
(
'获取
货站提货POD信息'
,
'获取货站提货
POD信息'
),
(
'创建temu提单'
,
'创建temu提单'
),
],
string
=
'Action Type'
,
default
=
'获取
尾程
POD信息'
)
],
string
=
'Action Type'
,
default
=
'获取
货站提货
POD信息'
)
# ============temu提单 批量创建操作相关字段============
# 客户:默认TEMU平台客户,任一一个,可修改
...
...
@@ -49,11 +49,11 @@ class BatchGetPodInfoWizard(models.TransientModel):
string
=
'BL Number'
,
# 提单号
help
=
'Enter multiple BL numbers, one per line'
# 输入多个BL号,每行一个
)
# 获取
尾程
POD信息☑️(默认勾选)
# 获取
货站提货
POD信息☑️(默认勾选)
get_last_mile_pod
=
fields
.
Boolean
(
string
=
'Get
Last Mile POD'
,
# 获取尾程
POD信息
string
=
'Get
PickUp POD'
,
# 获取货站提货
POD信息
default
=
True
,
help
=
'Whether to get
last mile POD information'
# 是否获取尾程
POD信息
help
=
'Whether to get
pickup POD information'
# 是否获取货站提货
POD信息
)
generate_successful_processed
=
fields
.
Boolean
(
string
=
'生成成功涂抹的提单附件信息'
,
# 生成成功涂抹的提单附件信息
...
...
@@ -61,11 +61,11 @@ class BatchGetPodInfoWizard(models.TransientModel):
help
=
'勾选后显示确定按钮'
)
# ===========提单获取
尾程pod
操作相关字段============
# ===========提单获取
货站提货POD
操作相关字段============
sync_last_mile_pod
=
fields
.
Boolean
(
string
=
'Sync
Last Mile POD'
,
# 同步尾程
POD
string
=
'Sync
PickUp POD'
,
# 同步货站提货
POD
default
=
False
,
help
=
'Whether to sync
last mile POD information'
# 是否同步尾程
POD信息
help
=
'Whether to sync
pickup POD information'
# 是否同步货站提货
POD信息
)
remove_specified_text
=
fields
.
Boolean
(
...
...
@@ -90,7 +90,7 @@ class BatchGetPodInfoWizard(models.TransientModel):
sync_successful_processed
=
fields
.
Boolean
(
string
=
'是否同步成功涂抹的提单'
,
# 是否同步成功涂抹的提单
default
=
False
,
help
=
'勾选后显示同步
尾程POD和同步匹配节点的字段以及确定按钮'
# 勾选后显示同步尾程
POD和同步匹配节点的字段以及确定按钮
help
=
'勾选后显示同步
货站提货POD和同步匹配节点的字段以及确定按钮'
# 勾选后显示同步货站提货
POD和同步匹配节点的字段以及确定按钮
)
show_error_message
=
fields
.
Text
(
...
...
@@ -126,10 +126,10 @@ class BatchGetPodInfoWizard(models.TransientModel):
预览操作:获取PDF、处理涂抹、合并PDF并显示
"""
action_type
=
self
.
action_type
wizard_name
=
_
(
'Batch Get POD Info'
)
if
action_type
==
'获取
尾程
POD信息'
else
_
(
wizard_name
=
_
(
'Batch Get POD Info'
)
if
action_type
==
'获取
货站提货
POD信息'
else
_
(
'Create TEMU Bill of Loading'
)
wizard_form_view
=
[[
self
.
env
.
ref
(
'ccs_base.view_batch_get_pod_info_wizard_form'
)
.
id
,
"form"
]]
if
action_type
==
'获取
尾程
POD信息'
else
[
"form"
]]
if
action_type
==
'获取
货站提货
POD信息'
else
[
[
self
.
env
.
ref
(
'ccs_base.view_batch_create_and_get_pod_info_wizard_form'
)
.
id
,
"form"
]]
self
.
show_error_message
=
False
try
:
...
...
@@ -168,7 +168,7 @@ class BatchGetPodInfoWizard(models.TransientModel):
# 如果所有文件都成功了(没有失败的文件),自动勾选"是否同步成功涂抹的提单"
if
len
(
successful_files
)
==
len
(
processed_files
)
and
not
failed_files
and
not
self
.
show_error_message
:
if
action_type
==
'获取
尾程
POD信息'
:
if
action_type
==
'获取
货站提货
POD信息'
:
self
.
sync_successful_processed
=
True
_logger
.
info
(
f
"所有提单都处理成功,自动勾选同步选项"
)
else
:
...
...
@@ -189,7 +189,7 @@ class BatchGetPodInfoWizard(models.TransientModel):
self
.
show_error_message
=
f
"{existing_error}{success_msg}"
_logger
.
info
(
f
"部分提单处理失败(成功:{len(successful_files)},失败:{len(failed_files)}),成功处理的提单号已显示"
)
if
action_type
==
'获取
尾程
POD信息'
:
if
action_type
==
'获取
货站提货
POD信息'
:
self
.
sync_successful_processed
=
False
else
:
self
.
generate_successful_processed
=
False
...
...
@@ -211,14 +211,14 @@ class BatchGetPodInfoWizard(models.TransientModel):
'bl_no'
:
bl_no
})
# 没有涂抹文字,所有文件都成功,自动勾选
if
action_type
==
'获取
尾程
POD信息'
:
if
action_type
==
'获取
货站提货
POD信息'
:
self
.
sync_successful_processed
=
True
_logger
.
info
(
f
"未启用涂抹文字,所有提单都成功,自动勾选同步选项"
)
else
:
self
.
generate_successful_processed
=
True
else
:
self
.
processed_files_data
=
''
if
action_type
==
'获取
尾程
POD信息'
:
if
action_type
==
'获取
货站提货
POD信息'
:
self
.
sync_successful_processed
=
False
else
:
self
.
generate_successful_processed
=
False
...
...
@@ -256,13 +256,13 @@ class BatchGetPodInfoWizard(models.TransientModel):
start_time
=
time
.
time
()
self
.
show_error_message
=
False
action_type
=
self
.
action_type
wizard_name
=
_
(
'Batch Get POD Info'
)
if
action_type
==
'获取
尾程
POD信息'
else
_
(
wizard_name
=
_
(
'Batch Get POD Info'
)
if
action_type
==
'获取
货站提货
POD信息'
else
_
(
'Create TEMU Bill of Loading'
)
wizard_form_view
=
[[
self
.
env
.
ref
(
'ccs_base.view_batch_get_pod_info_wizard_form'
)
.
id
,
"form"
]]
if
action_type
==
'获取
尾程
POD信息'
else
[
"form"
]]
if
action_type
==
'获取
货站提货
POD信息'
else
[
[
self
.
env
.
ref
(
'ccs_base.view_batch_create_and_get_pod_info_wizard_form'
)
.
id
,
"form"
]]
bl_objs
=
self
.
get_bl_objs
()
if
action_type
==
'获取
尾程
POD信息'
or
(
action_type
==
'创建temu提单'
and
self
.
get_last_mile_pod
):
if
action_type
==
'获取
货站提货
POD信息'
or
(
action_type
==
'创建temu提单'
and
self
.
get_last_mile_pod
):
# 优先使用已处理的文件数据(预览时已处理)
processed_files
=
None
if
self
.
processed_files_data
:
...
...
@@ -346,7 +346,7 @@ class BatchGetPodInfoWizard(models.TransientModel):
self
.
_write_pdf_file
(
successful_processed_files
)
# 再同步和回写
if
action_type
==
'获取
尾程
POD信息'
:
if
action_type
==
'获取
货站提货
POD信息'
:
if
self
.
sync_last_mile_pod
and
successful_processed_files
:
self
.
_sync_last_mile_pod
(
successful_processed_files
)
...
...
@@ -391,7 +391,7 @@ class BatchGetPodInfoWizard(models.TransientModel):
}
def
get_bl_objs
(
self
):
if
self
.
action_type
==
'获取
尾程
POD信息'
:
if
self
.
action_type
==
'获取
货站提货
POD信息'
:
bl_objs
=
self
.
get_order
()
else
:
raw_lines
=
[
i
.
strip
()
for
i
in
self
.
bl_numbers
.
splitlines
()
if
i
.
strip
()]
...
...
@@ -723,11 +723,11 @@ class BatchGetPodInfoWizard(models.TransientModel):
def
_sync_last_mile_pod
(
self
,
processed_files
):
"""
Sync
last mile POD information # 同步尾程
POD信息
Sync
pickup POD information # 同步货站提货
POD信息
:param processed_files: 处理后的文件数组
"""
# return False#测试 先不同步
# 同步
尾程
POD信息
# 同步
货站提货
POD信息
is_fail
=
[]
# 同步失败
for
file_info
in
processed_files
:
if
not
file_info
[
'bl'
]:
...
...
@@ -737,7 +737,7 @@ class BatchGetPodInfoWizard(models.TransientModel):
clearance_file
=
file_info
.
get
(
'clearance_file'
)
if
clearance_file
:
try
:
clearance_file
.
action_sync
()
# 同步
尾程
POD
clearance_file
.
action_sync
()
# 同步
货站提货
POD
except
Exception
as
e
:
logging
.
info
(
'_sync_last_mile_pod:
%
s'
%
e
)
is_fail
=
True
...
...
@@ -1882,7 +1882,6 @@ class BatchGetPodInfoWizard(models.TransientModel):
:return: 提单对应的节点以及节点操作时间
"""
ship_packages
=
[]
error_bl
=
[]
# 查找对应的清关节点(勾选了POD节点匹配的节点)
pod_node
=
self
.
env
[
'cc.node'
]
.
search
([
(
'is_pod_node'
,
'='
,
True
),
...
...
@@ -1893,7 +1892,6 @@ class BatchGetPodInfoWizard(models.TransientModel):
continue
bl
=
file_info
[
'bl'
]
if
not
pod_node
:
_logger
.
info
(
f
"未找到尾程POD节点匹配的节点,提单号: {bl.bl_no}"
)
continue
# 只使用满足条件的小包(经过验证的valid_packages)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论