Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hh_ccs
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
贺阳
hh_ccs
Commits
afef8d8f
提交
afef8d8f
authored
8月 06, 2025
作者:
贺阳
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
查询尾程交货数据时,判断时间是否倒序了
上级
882d5dbe
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
14 行增加
和
11 行删除
+14
-11
order_controller.py
ccs_connect_tiktok/controllers/order_controller.py
+0
-0
pda_scan_record.py
ccs_connect_tiktok/models/pda_scan_record.py
+11
-4
pda_scan_record_views.xml
ccs_connect_tiktok/views/pda_scan_record_views.xml
+3
-7
没有找到文件。
ccs_connect_tiktok/controllers/order_controller.py
浏览文件 @
afef8d8f
差异被折叠。
点击展开。
ccs_connect_tiktok/models/pda_scan_record.py
浏览文件 @
afef8d8f
...
@@ -20,7 +20,7 @@ class PDAScanRecord(models.Model):
...
@@ -20,7 +20,7 @@ class PDAScanRecord(models.Model):
self
.
record_type
=
'handover'
self
.
record_type
=
'handover'
operator_id
=
fields
.
Many2one
(
'res.users'
,
string
=
'操作人'
,
required
=
True
)
operator_id
=
fields
.
Many2one
(
'res.users'
,
string
=
'操作人'
,
required
=
True
)
#
operation_time = fields.Datetime(string='操作时间', required=True, default=fields.Datetime.now)
operation_time
=
fields
.
Datetime
(
string
=
'操作时间'
,
required
=
True
,
default
=
fields
.
Datetime
.
now
)
operation
=
fields
.
Selection
([
operation
=
fields
.
Selection
([
(
'bill_tally'
,
_
(
'Bill Tally'
)),
# 按提单理货
(
'bill_tally'
,
_
(
'Bill Tally'
)),
# 按提单理货
(
'tail_tally'
,
_
(
'Tail Tally'
)),
# 按尾程理货
(
'tail_tally'
,
_
(
'Tail Tally'
)),
# 按尾程理货
...
@@ -43,7 +43,7 @@ class PDAScanRecord(models.Model):
...
@@ -43,7 +43,7 @@ class PDAScanRecord(models.Model):
failure_reason
=
fields
.
Char
(
string
=
_
(
'Failure Reason'
))
# 失败原因
failure_reason
=
fields
.
Char
(
string
=
_
(
'Failure Reason'
))
# 失败原因
@api.model
@api.model
def
create_scan_record
(
self
,
operation
,
record_type
,
bill_number
,
transfer_number
,
state
,
operator_id
=
False
,
bl_id
=
False
,
failure_reason
=
False
):
def
create_scan_record
(
self
,
operation
,
record_type
,
bill_number
,
transfer_number
,
state
,
operator_id
=
False
,
bl_id
=
False
,
failure_reason
=
False
,
operation_time
=
False
):
"""
"""
创建扫码记录的方法,供接口调用
创建扫码记录的方法,供接口调用
Create scan record method for API calls
Create scan record method for API calls
...
@@ -58,7 +58,8 @@ class PDAScanRecord(models.Model):
...
@@ -58,7 +58,8 @@ class PDAScanRecord(models.Model):
if
bl_obj
:
if
bl_obj
:
bl_id
=
bl_obj
.
id
bl_id
=
bl_obj
.
id
record
=
self
.
create
({
# 准备创建记录的数据
record_data
=
{
'operator_id'
:
operator_id
,
'operator_id'
:
operator_id
,
'operation'
:
operation
,
'operation'
:
operation
,
'record_type'
:
record_type
,
'record_type'
:
record_type
,
...
@@ -67,7 +68,13 @@ class PDAScanRecord(models.Model):
...
@@ -67,7 +68,13 @@ class PDAScanRecord(models.Model):
'bl_id'
:
bl_id
,
'bl_id'
:
bl_id
,
'state'
:
state
,
'state'
:
state
,
'failure_reason'
:
failure_reason
'failure_reason'
:
failure_reason
})
}
# 如果传入了自定义操作时间,使用它
if
operation_time
:
record_data
[
'operation_time'
]
=
operation_time
record
=
self
.
create
(
record_data
)
return
{
return
{
'success'
:
True
,
'success'
:
True
,
'record_id'
:
record
.
id
,
'record_id'
:
record
.
id
,
...
...
ccs_connect_tiktok/views/pda_scan_record_views.xml
浏览文件 @
afef8d8f
...
@@ -7,9 +7,7 @@
...
@@ -7,9 +7,7 @@
<field
name=
"arch"
type=
"xml"
>
<field
name=
"arch"
type=
"xml"
>
<tree
string=
"PDA Scan Record"
decoration-info=
"state == 'success'"
decoration-danger=
"state == 'failed'"
>
<tree
string=
"PDA Scan Record"
decoration-info=
"state == 'success'"
decoration-danger=
"state == 'failed'"
>
<field
name=
"operator_id"
/>
<field
name=
"operator_id"
/>
<field
name=
"create_date"
/>
<field
name=
"operation_time"
/>
<!-- <field name="operator_id"/>
<field name="operation_time"/> -->
<field
name=
"operation"
/>
<field
name=
"operation"
/>
<field
name=
"record_type"
/>
<field
name=
"record_type"
/>
<field
name=
"bill_number"
/>
<field
name=
"bill_number"
/>
...
@@ -34,9 +32,7 @@
...
@@ -34,9 +32,7 @@
<group>
<group>
<group>
<group>
<field
name=
"operator_id"
/>
<field
name=
"operator_id"
/>
<field
name=
"create_date"
/>
<field
name=
"operation_time"
/>
<!-- <field name="operator_id"/>
<field name="operation_time"/> -->
<field
name=
"operation"
/>
<field
name=
"operation"
/>
</group>
</group>
<group>
<group>
...
@@ -61,7 +57,7 @@
...
@@ -61,7 +57,7 @@
<field
name=
"arch"
type=
"xml"
>
<field
name=
"arch"
type=
"xml"
>
<search
string=
"PDA Scan Record"
>
<search
string=
"PDA Scan Record"
>
<field
name=
"operator_id"
/>
<field
name=
"operator_id"
/>
<field
name=
"
create_dat
e"
/>
<field
name=
"
operation_tim
e"
/>
<field
name=
"operation"
/>
<field
name=
"operation"
/>
<field
name=
"record_type"
/>
<field
name=
"record_type"
/>
<field
name=
"bill_number"
/>
<field
name=
"bill_number"
/>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论