Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hh_ccs
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
贺阳
hh_ccs
Commits
18e31d9e
提交
18e31d9e
authored
10月 31, 2025
作者:
贺阳
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提单增加推送备注的显示
上级
412ebd58
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
71 行增加
和
41 行删除
+71
-41
zh_CN.po
ccs_base/i18n/zh_CN.po
+12
-2
batch_get_pod_info_wizard.py
ccs_base/wizard/batch_get_pod_info_wizard.py
+1
-1
batch_get_pod_info_wizard_views.xml
ccs_base/wizard/batch_get_pod_info_wizard_views.xml
+5
-4
zh_CN.po
ccs_connect_tiktok/i18n/zh_CN.po
+17
-18
cc_bill_loading.py
ccs_connect_tiktok/models/cc_bill_loading.py
+14
-11
cc_bl_view.xml
ccs_connect_tiktok/views/cc_bl_view.xml
+17
-0
batch_get_pod_info_wizard.py
ccs_connect_tiktok/wizard/batch_get_pod_info_wizard.py
+5
-5
没有找到文件。
ccs_base/i18n/zh_CN.po
浏览文件 @
18e31d9e
...
...
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-3
0 06:19
+0000\n"
"PO-Revision-Date: 2025-10-3
0 14:20
+0800\n"
"POT-Creation-Date: 2025-10-3
1 02:13
+0000\n"
"PO-Revision-Date: 2025-10-3
1 10:14
+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: zh_CN\n"
...
...
@@ -3342,6 +3342,11 @@ msgstr "显示错误消息"
msgid "Show error message"
msgstr "显示错误消息"
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__skip_ocr_direct_ai
msgid "Skip OCR Direct AI"
msgstr "跳过 OCR 直接 AI"
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_bl_view
msgid "Start Port"
...
...
@@ -3959,6 +3964,11 @@ msgstr "是否分大包导出"
msgid "Whether to remove specified text from PDF files"
msgstr "是否涂抹PDF中的指定文字"
#. module: ccs_base
#: model:ir.model.fields,help:ccs_base.field_batch_get_pod_info_wizard__skip_ocr_direct_ai
msgid "Whether to skip OCR processing and directly use AI processing (for testing AI)"
msgstr ""
#. module: ccs_base
#: model:ir.model.fields,help:ccs_base.field_batch_get_pod_info_wizard__sync_match_node
msgid "Whether to sync and push matched node information"
...
...
ccs_base/wizard/batch_get_pod_info_wizard.py
浏览文件 @
18e31d9e
...
...
@@ -94,7 +94,7 @@ class BatchGetPodInfoWizard(models.TransientModel):
# 如果启用了涂抹文字,进行处理
if
self
.
remove_specified_text
and
processed_files
:
#
processed_files = self._remove_specified_text(processed_files, debug_mode=False)
processed_files
=
self
.
_remove_specified_text
(
processed_files
,
debug_mode
=
False
)
# 合并PDF并保存到pdf_file字段
self
.
_merge_pdf_files
(
processed_files
)
...
...
ccs_base/wizard/batch_get_pod_info_wizard_views.xml
浏览文件 @
18e31d9e
...
...
@@ -31,14 +31,15 @@
<strong>
Description:
</strong>
<!-- 说明: -->
<ul>
<li
attrs=
"{'invisible': [('pdf_file', '!=', False)]}"
>
<strong>
Remove Specified Text:
</strong>
Remove specified text (AGN, UCLINK LOGISITICS LTD) from PDF files
</li>
<!-- 涂抹指定文字:对PDF文件中的指定文字进行涂抹处理 -->
<li
attrs=
"{'invisible': ['|',('pdf_file', '=', False),('show_error_message', '!=', False)]}"
>
<strong>
Sync Last Mile POD:
</strong>
Synchronize POD (Proof of Delivery) attachment information with TK system, including
big package quantities and container numbers
</li>
<!-- 同步尾程POD:向TK同步尾程交接POD(待大包数量和箱号)的附件信息 -->
<li
attrs=
"{'invisible': ['|',('pdf_file', '=', False),('show_error_message', '!=', False)]}"
>
<strong>
Remove Specified Text:
</strong>
Remove specified text (AGN, UCLINK LOGISITICS LTD) from PDF files
</li>
<!-- 涂抹指定文字:对PDF文件中的指定文字进行涂抹处理 -->
<li
attrs=
"{'invisible': ['|',('pdf_file', '=', False),('show_error_message', '!=', False)]}"
>
<strong>
Sync Push Match Node:
</strong>
Synchronize and push matched node information based on POD file, extract time from
...
...
ccs_connect_tiktok/i18n/zh_CN.po
浏览文件 @
18e31d9e
...
...
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-
09-23 09:31
+0000\n"
"PO-Revision-Date: 2025-
09-23 17:35
+0800\n"
"POT-Creation-Date: 2025-
10-31 02:15
+0000\n"
"PO-Revision-Date: 2025-
10-31 10:16
+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: zh_CN\n"
...
...
@@ -54,6 +54,11 @@ msgstr ""
msgid "Attachment"
msgstr "附件"
#. module: ccs_connect_tiktok
#: model:ir.model,name:ccs_connect_tiktok.model_batch_get_pod_info_wizard
msgid "Batch Get POD Info Wizard"
msgstr "批量获取尾程POD向导"
#. module: ccs_connect_tiktok
#: model:ir.actions.server,name:ccs_connect_tiktok.action_batch_sync_bl_status
msgid "Batch Sync Bill Of Loading Status"
...
...
@@ -396,14 +401,6 @@ msgstr "托盘"
msgid "Pallet Handover"
msgstr "托盘交货"
#. module: ccs_connect_tiktok
#. odoo-python
#: code:addons/ccs_connect_tiktok/models/pda_scan_record.py:0
#: model:ir.model.fields.selection,name:ccs_connect_tiktok.selection__pda_scan_record__operation__pallet_pickup
#, python-format
msgid "Pallet Pickup"
msgstr "托盘提货"
#. module: ccs_connect_tiktok
#. odoo-python
#: code:addons/ccs_connect_tiktok/models/pda_scan_record.py:0
...
...
@@ -442,6 +439,11 @@ msgstr "进度"
msgid "Progress Name"
msgstr "进度名称"
#. module: ccs_connect_tiktok
#: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.search_cc_bl_view
msgid "Push Failed"
msgstr "推送失败"
#. module: ccs_connect_tiktok
#: model:ir.model,name:ccs_connect_tiktok.model_cc_ship_package
#: model:ir.model.fields,field_description:ccs_connect_tiktok.field_cc_ship_package_sync_log__package_id
...
...
@@ -451,6 +453,11 @@ msgstr "进度名称"
msgid "Ship Package"
msgstr "小包"
#. module: ccs_connect_tiktok
#: model:ir.model.fields,field_description:ccs_connect_tiktok.field_cc_bl__push_remark
msgid "Ship Package Push Remark"
msgstr "小包推送备注"
#. module: ccs_connect_tiktok
#: model:ir.model.fields,field_description:ccs_connect_tiktok.field_batch_input_ship_package_status_wizard__is_skip_check
#: model:ir.model.fields,field_description:ccs_connect_tiktok.field_update_bl_status_wizard__is_skip_check
...
...
@@ -565,14 +572,6 @@ msgstr "进度编码"
msgid "Tail Handover"
msgstr "按尾程交货"
#. module: ccs_connect_tiktok
#. odoo-python
#: code:addons/ccs_connect_tiktok/models/pda_scan_record.py:0
#: model:ir.model.fields.selection,name:ccs_connect_tiktok.selection__pda_scan_record__operation__tail_pickup
#, python-format
msgid "Tail Pickup"
msgstr ""
#. module: ccs_connect_tiktok
#. odoo-python
#: code:addons/ccs_connect_tiktok/models/pda_scan_record.py:0
...
...
ccs_connect_tiktok/models/cc_bill_loading.py
浏览文件 @
18e31d9e
...
...
@@ -351,7 +351,7 @@ class CcBl(models.Model):
bl_sync_log_ids
=
fields
.
One2many
(
'cc.bl.sync.log'
,
'bl_id'
,
string
=
'Bill Of Loading Sync Logs'
)
# 增加提单状态操作时间:取最新一条提单节点同步信息的操作时间
process_time
=
fields
.
Datetime
(
string
=
'Process Time'
,
compute
=
'_compute_process_time'
,
store
=
True
)
push_remark
=
fields
.
Text
(
'
Push Remark
'
)
push_remark
=
fields
.
Text
(
'
Ship Package Push Remark'
,
default
=
'
'
)
def
change_state_by_ship_package
(
self
):
"""
...
...
@@ -1272,18 +1272,17 @@ class CcBl(models.Model):
if
package
.
get
(
'tally_time'
):
for
single_id
in
package
[
'id'
]:
ship_packages_dict
[
single_id
]
=
package
[
'tally_time'
]
if
action_type
==
'push_match_node'
and
pod_node_id
:
#尾程匹配的节点包括前序节点
#
尾程匹配的节点包括前序节点
node_obj
=
self
.
env
[
'cc.node'
]
.
sudo
()
.
search
([(
'id'
,
'='
,
pod_node_id
)])
else
:
tally_state
=
'checked_goods'
if
action_type
==
'tally'
else
(
'picked_up'
if
action_type
==
'pickup'
else
'handover_completed'
)
'picked_up'
if
action_type
==
'pickup'
else
'handover_completed'
)
# 检查理货或尾程交接的节点,根据排序进行升序
node_obj
=
self
.
env
[
'cc.node'
]
.
sudo
()
.
search
([
(
'node_type'
,
'='
,
'package'
),
(
'tally_state'
,
'='
,
tally_state
)
(
'tally_state'
,
'='
,
tally_state
)
],
order
=
'seq asc'
)
if
not
node_obj
:
return
True
...
...
@@ -1303,9 +1302,11 @@ class CcBl(models.Model):
package_id
,
set
()):
tally_time
=
ship_packages_dict
.
get
(
package_id
)
if
tally_time
:
tally_time
=
datetime
.
strptime
(
tally_time
,
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
operation_time
=
tally_time
if
pod_node_id
and
pod_node_id
==
before_node
.
id
else
((
tally_time
-
timedelta
(
minutes
=
before_minutes
))
if
tally_time
else
fields
.
Datetime
.
now
()
-
timedelta
(
minutes
=
before_minutes
))
tally_time
=
datetime
.
strptime
(
tally_time
,
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
operation_time
=
tally_time
if
pod_node_id
and
pod_node_id
==
before_node
.
id
else
((
tally_time
-
timedelta
(
minutes
=
before_minutes
))
if
tally_time
else
fields
.
Datetime
.
now
()
-
timedelta
(
minutes
=
before_minutes
))
update_data
.
append
((
package_id
,
before_node
.
id
,
...
...
@@ -1336,7 +1337,7 @@ class CcBl(models.Model):
item
.
try_callback_track
(
max_retries
=
2
,
ship_package_ids
=
ship_package_ids
,
user_obj
=
user_obj
)
# 理货或尾程交接的节点
#pda需要生成后续节点
#
pda需要生成后续节点
if
action_type
!=
'push_match_node'
:
# 预先获取所有状态节点
all_state_nodes
=
self
.
env
[
'cc.node'
]
.
sudo
()
.
search
([
...
...
@@ -1352,7 +1353,9 @@ class CcBl(models.Model):
if
current_state_node
.
seq
<
node
.
seq
:
tally_time
=
ship_packages_dict
.
get
(
package
.
id
)
if
tally_time
:
operation_time
=
(
datetime
.
strptime
(
tally_time
,
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
+
timedelta
(
minutes
=
next_minutes
*
index
))
if
tally_time
else
fields
.
Datetime
.
now
()
+
timedelta
(
operation_time
=
(
datetime
.
strptime
(
tally_time
,
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
+
timedelta
(
minutes
=
next_minutes
*
index
))
if
tally_time
else
fields
.
Datetime
.
now
()
+
timedelta
(
minutes
=
next_minutes
*
index
)
update_data
.
append
((
package
.
id
,
...
...
ccs_connect_tiktok/views/cc_bl_view.xml
浏览文件 @
18e31d9e
...
...
@@ -60,11 +60,28 @@
<field
name=
"is_bl_sync"
string=
"Is Sync"
readonly=
"1"
/>
<field
name=
"state_explain"
string=
"State Explain"
/>
</group>
<group
attrs=
"{'invisible': [('push_remark', '=', '')]}"
>
<field
name=
"push_remark"
readonly=
"1"
/>
</group>
</page>
</notebook>
</field>
</record>
<record
model=
"ir.ui.view"
id=
"search_cc_bl_view"
>
<field
name=
"name"
>
search.cc.bl
</field>
<field
name=
"model"
>
cc.bl
</field>
<field
name=
"inherit_id"
ref=
"ccs_base.search_cc_bl_view"
/>
<field
name=
"arch"
type=
"xml"
>
<filter
name=
"filter_state_not_finished"
position=
"after"
>
<separator/>
<filter
string=
"Push Failed"
name=
"filter_push_failed"
domain=
"[('push_remark', '!=', '')]"
/>
</filter>
</field>
</record>
<record
id=
"action_batch_sync_package_status"
model=
"ir.actions.server"
>
<field
name=
"name"
>
Batch Sync Package Status
</field>
<field
name=
"model_id"
ref=
"model_cc_bl"
/>
...
...
ccs_connect_tiktok/wizard/batch_get_pod_info_wizard.py
浏览文件 @
18e31d9e
...
...
@@ -186,11 +186,11 @@ class BatchGetPodInfoWizard(models.TransientModel):
# 构建备注信息
remark
=
f
"获取尾程POD,自动推送节点失败,有风险产生倒挂。失败小包数量: {failed_count},请手动操作{extract_time.strftime('
%
Y-
%
m-
%
d
%
H:
%
M:
%
S')}(获取时间)"
# 更新提单的推送备注字段
if
hasattr
(
bl
,
'push_remark'
):
# 如果已有备注,追加新备注
existing_remark
=
bl
.
push_remark
or
""
new_remark
=
f
"{existing_remark}
\n
{remark}"
if
existing_remark
else
remark
bl
.
write
({
'push_remark'
:
new_
remark
})
#
if hasattr(bl, 'push_remark'):
#
# 如果已有备注,追加新备注
#
existing_remark = bl.push_remark or ""
#
new_remark = f"{existing_remark}\n{remark}" if existing_remark else remark
bl
.
write
({
'push_remark'
:
remark
})
except
Exception
as
e
:
_logger
.
error
(
f
"为提单 {bl.bl_no} 添加推送备注失败: {str(e)}"
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论