Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hh_ccs
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
贺阳
hh_ccs
Commits
c6b93053
提交
c6b93053
authored
8月 06, 2025
作者:
贺阳
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加提单巡查
上级
afef8d8f
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
167 行增加
和
4 行删除
+167
-4
__manifest__.py
ccs_connect_tiktok/__manifest__.py
+1
-0
timer.xml
ccs_connect_tiktok/data/timer.xml
+13
-0
__init__.py
ccs_connect_tiktok/models/__init__.py
+1
-0
bl_patrol.py
ccs_connect_tiktok/models/bl_patrol.py
+0
-0
res_config_setting.py
ccs_connect_tiktok/models/res_config_setting.py
+21
-3
ir.model.access.csv
ccs_connect_tiktok/security/ir.model.access.csv
+3
-0
test_data.txt
ccs_connect_tiktok/test_data.txt
+0
-1
bl_patrol_views.xml
ccs_connect_tiktok/views/bl_patrol_views.xml
+107
-0
config_settings_views.xml
ccs_connect_tiktok/views/config_settings_views.xml
+21
-0
没有找到文件。
ccs_connect_tiktok/__manifest__.py
浏览文件 @
c6b93053
...
...
@@ -32,6 +32,7 @@
'views/cc_ship_package_view.xml'
,
'views/cc_bl_view.xml'
,
'views/pda_scan_record_views.xml'
,
'views/bl_patrol_views.xml'
,
],
'demo'
:
[
...
...
ccs_connect_tiktok/data/timer.xml
浏览文件 @
c6b93053
...
...
@@ -12,5 +12,17 @@
<field
name=
"active"
eval=
"False"
/>
</record>
<record
id=
"cron_bl_patrol"
model=
"ir.cron"
>
<field
name=
"name"
>
提单巡查
</field>
<field
name=
"model_id"
ref=
"ccs_connect_tiktok.model_bl_patrol"
/>
<field
name=
"state"
>
code
</field>
<field
name=
"code"
>
model.cron_bl_patrol()
</field>
<field
name=
'interval_number'
>
1
</field>
<field
name=
'interval_type'
>
days
</field>
<field
name=
"numbercall"
>
-1
</field>
<field
name=
"active"
eval=
"True"
/>
<field
name=
"nextcall"
eval=
"(DateTime.now() + timedelta(hours=8)).strftime('%Y-%m-%d %H:%M:%S')"
/>
</record>
</data>
</odoo>
\ No newline at end of file
ccs_connect_tiktok/models/__init__.py
浏览文件 @
c6b93053
...
...
@@ -9,6 +9,7 @@ from . import cc_bill_loading
from
.
import
ir_attachment
from
.
import
http
from
.
import
pda_scan_record
from
.
import
bl_patrol
ccs_connect_tiktok/models/bl_patrol.py
0 → 100644
浏览文件 @
c6b93053
差异被折叠。
点击展开。
ccs_connect_tiktok/models/res_config_setting.py
浏览文件 @
c6b93053
...
...
@@ -17,6 +17,12 @@ class ResConfigSettings(models.TransientModel):
tt_customer_id
=
fields
.
Many2one
(
'res.partner'
,
string
=
'客户'
)
#交货操作晚于提货操作X分钟【默认80分钟】
delivery_time
=
fields
.
Integer
(
'交货操作晚于提货操作X分钟'
,
default
=
80
,
config_parameter
=
'delivery_time'
)
# 巡查配置
patrol_receiver_emails
=
fields
.
Char
(
'接收邮件地址'
,
help
=
'多个邮箱地址,用逗号分隔'
,
config_parameter
=
'patrol_receiver_emails'
)
patrol_sender_email
=
fields
.
Char
(
'发送邮箱地址'
,
config_parameter
=
'patrol_sender_email'
)
patrol_check_days
=
fields
.
Integer
(
'巡查天数'
,
default
=
5
,
help
=
'检查近几天的提单'
,
config_parameter
=
'patrol_check_days'
)
patrol_start_hour
=
fields
.
Integer
(
'巡查开始时间(小时)'
,
default
=
8
,
help
=
'北京时间,24小时制'
,
config_parameter
=
'patrol_start_hour'
)
@api.model
def
get_values
(
self
):
...
...
@@ -32,6 +38,10 @@ class ResConfigSettings(models.TransientModel):
tt_version
=
config
.
get_param
(
'tt_version'
,
default
=
''
)
tt_customer_id
=
config
.
get_param
(
'tt_customer_id'
,
default
=
False
)
delivery_time
=
config
.
get_param
(
'delivery_time'
,
default
=
80
)
patrol_receiver_emails
=
config
.
get_param
(
'patrol_receiver_emails'
,
default
=
''
)
patrol_sender_email
=
config
.
get_param
(
'patrol_sender_email'
,
default
=
''
)
patrol_check_days
=
config
.
get_param
(
'patrol_check_days'
,
default
=
5
)
patrol_start_hour
=
config
.
get_param
(
'patrol_start_hour'
,
default
=
8
)
customer
=
self
.
env
[
'res.partner'
]
.
sudo
()
.
search
([(
'id'
,
'='
,
tt_customer_id
)])
values
.
update
(
tt_url
=
tt_url
,
...
...
@@ -39,7 +49,11 @@ class ResConfigSettings(models.TransientModel):
tt_app_secret
=
tt_app_secret
,
tt_version
=
tt_version
,
tt_customer_id
=
customer
,
delivery_time
=
delivery_time
delivery_time
=
delivery_time
,
patrol_receiver_emails
=
patrol_receiver_emails
,
patrol_sender_email
=
patrol_sender_email
,
patrol_check_days
=
patrol_check_days
,
patrol_start_hour
=
patrol_start_hour
)
return
values
...
...
@@ -51,4 +65,8 @@ class ResConfigSettings(models.TransientModel):
ir_config
.
set_param
(
"tt_app_secret"
,
self
.
tt_app_secret
or
""
)
ir_config
.
set_param
(
"tt_version"
,
self
.
tt_version
or
""
)
ir_config
.
set_param
(
"tt_customer_id"
,
self
.
tt_customer_id
.
id
or
False
)
ir_config
.
set_param
(
"delivery_time"
,
self
.
delivery_time
or
80
)
\ No newline at end of file
ir_config
.
set_param
(
"delivery_time"
,
self
.
delivery_time
or
80
)
ir_config
.
set_param
(
"patrol_receiver_emails"
,
self
.
patrol_receiver_emails
or
""
)
ir_config
.
set_param
(
"patrol_sender_email"
,
self
.
patrol_sender_email
or
""
)
ir_config
.
set_param
(
"patrol_check_days"
,
self
.
patrol_check_days
or
5
)
ir_config
.
set_param
(
"patrol_start_hour"
,
self
.
patrol_start_hour
or
8
)
\ No newline at end of file
ccs_connect_tiktok/security/ir.model.access.csv
浏览文件 @
c6b93053
...
...
@@ -15,3 +15,6 @@ access_cc_bl_sync_log_ccs_base.group_clearance_of_customs_user,cc_bl_sync_log cc
access_pda_scan_record_user,pda.scan.record.user,model_pda_scan_record,base.group_user,1,1,1,0
access_pda_scan_record_manager,pda.scan.record.manager,model_pda_scan_record,base.group_system,1,1,1,1
access_bl_patrol_user,bl.patrol.user,model_bl_patrol,base.group_user,1,0,0,0
access_bl_patrol_manager,bl.patrol.manager,model_bl_patrol,base.group_system,1,1,1,1
ccs_connect_tiktok/test_data.txt
deleted
100644 → 0
浏览文件 @
afef8d8f
# 根据空运提单和大包以及小包和产品的关系,生成一组测试数据,每个提单包括2个大包, 每个大包包括2个小包, 每个小包包括2个产品
ccs_connect_tiktok/views/bl_patrol_views.xml
0 → 100644
浏览文件 @
c6b93053
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- 巡查列表视图 -->
<record
id=
"view_bl_patrol_tree"
model=
"ir.ui.view"
>
<field
name=
"name"
>
bl.patrol.tree
</field>
<field
name=
"model"
>
bl.patrol
</field>
<field
name=
"arch"
type=
"xml"
>
<tree
string=
"提单巡查"
>
<field
name=
"name"
/>
<field
name=
"check_date"
/>
<field
name=
"bl_count"
/>
<field
name=
"issue_count"
/>
<field
name=
"state"
/>
<field
name=
"email_sent"
/>
<field
name=
"email_sent_time"
/>
<field
name=
"create_date"
/>
</tree>
</field>
</record>
<!-- 巡查表单视图 -->
<record
id=
"view_bl_patrol_form"
model=
"ir.ui.view"
>
<field
name=
"name"
>
bl.patrol.form
</field>
<field
name=
"model"
>
bl.patrol
</field>
<field
name=
"arch"
type=
"xml"
>
<form
string=
"提单巡查"
>
<header>
<button
name=
"action_manual_patrol"
type=
"object"
string=
"手动执行巡查"
class=
"oe_highlight"
attrs=
"{'invisible': [('state', '!=', 'draft')]}"
/>
<field
name=
"state"
widget=
"statusbar"
/>
</header>
<sheet>
<group>
<group>
<field
name=
"name"
/>
<field
name=
"check_date"
/>
<field
name=
"bl_count"
/>
<field
name=
"issue_count"
/>
</group>
<group>
<field
name=
"email_sent"
/>
<field
name=
"email_sent_time"
/>
<field
name=
"create_date"
/>
</group>
</group>
<notebook>
<page
string=
"小包轨迹问题"
attrs=
"{'invisible': [('package_issues', '=', False)]}"
>
<field
name=
"package_issues"
readonly=
"1"
/>
</page>
<page
string=
"提单关务节点问题"
attrs=
"{'invisible': [('bl_issues', '=', False)]}"
>
<field
name=
"bl_issues"
readonly=
"1"
/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- 巡查搜索视图 -->
<record
id=
"view_bl_patrol_search"
model=
"ir.ui.view"
>
<field
name=
"name"
>
bl.patrol.search
</field>
<field
name=
"model"
>
bl.patrol
</field>
<field
name=
"arch"
type=
"xml"
>
<search
string=
"提单巡查"
>
<field
name=
"name"
/>
<field
name=
"check_date"
/>
<filter
string=
"草稿"
name=
"draft"
domain=
"[('state', '=', 'draft')]"
/>
<filter
string=
"执行中"
name=
"running"
domain=
"[('state', '=', 'running')]"
/>
<filter
string=
"完成"
name=
"done"
domain=
"[('state', '=', 'done')]"
/>
<filter
string=
"失败"
name=
"failed"
domain=
"[('state', '=', 'failed')]"
/>
<filter
string=
"有问题"
name=
"has_issues"
domain=
"[('issue_count', '>', 0)]"
/>
<group
expand=
"0"
string=
"分组"
>
<filter
string=
"状态"
name=
"group_state"
context=
"{'group_by': 'state'}"
/>
<filter
string=
"巡查日期"
name=
"group_check_date"
context=
"{'group_by': 'check_date'}"
/>
</group>
</search>
</field>
</record>
<!-- 巡查动作 -->
<record
id=
"action_bl_patrol"
model=
"ir.actions.act_window"
>
<field
name=
"name"
>
提单巡查
</field>
<field
name=
"res_model"
>
bl.patrol
</field>
<field
name=
"view_mode"
>
tree,form
</field>
<field
name=
"context"
>
{'search_default_done': 1}
</field>
<field
name=
"help"
type=
"html"
>
<p
class=
"o_view_nocontent_smiling_face"
>
创建第一个巡查记录
</p>
<p>
系统将自动巡查提单的轨迹问题,包括小包轨迹倒叙和提单关务节点倒叙。
</p>
</field>
</record>
<!-- 菜单项 -->
<menuitem
id=
"menu_bl_patrol"
name=
"提单巡查"
action=
"action_bl_patrol"
sequence=
"22"
/>
</data>
</odoo>
\ No newline at end of file
ccs_connect_tiktok/views/config_settings_views.xml
浏览文件 @
c6b93053
...
...
@@ -31,6 +31,27 @@
</div>
</div>
</div>
<div
class=
"col-12 col-lg-6 o_setting_box"
>
<div
class=
"o_setting_left_pane"
/>
<div
class=
"o_setting_right_pane"
>
<div
class=
"text-muted"
>
<label
for=
"patrol_receiver_emails"
/>
<field
name=
"patrol_receiver_emails"
/>
</div>
<div
class=
"text-muted"
>
<label
for=
"patrol_sender_email"
/>
<field
name=
"patrol_sender_email"
/>
</div>
<div
class=
"text-muted"
>
<label
for=
"patrol_check_days"
/>
<field
name=
"patrol_check_days"
/>
</div>
<div
class=
"text-muted"
>
<label
for=
"patrol_start_hour"
/>
<field
name=
"patrol_start_hour"
/>
</div>
</div>
</div>
<div
class=
"col-12 col-lg-6 o_setting_box"
>
<div
class=
"o_setting_left_pane"
/>
<div
class=
"o_setting_right_pane"
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论