Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hh_ccs
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
贺阳
hh_ccs
Commits
f593d755
提交
f593d755
authored
8月 23, 2024
作者:
贺阳
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1、提单接口优化
2、节点增加后续节点,多选,提单修改状态选择 修改节点时根据原节点的后续节点过滤
上级
39d19b53
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
30 行增加
和
15 行删除
+30
-15
cc_bill_loading.py
ccs_base/models/cc_bill_loading.py
+4
-6
cc_node.py
ccs_base/models/cc_node.py
+2
-0
cc_node_view.xml
ccs_base/views/cc_node_view.xml
+2
-2
batch_input_ship_package_statu_wizard.py
ccs_base/wizard/batch_input_ship_package_statu_wizard.py
+2
-0
batch_input_ship_package_statu_wizard.xml
ccs_base/wizard/batch_input_ship_package_statu_wizard.xml
+12
-5
tt_controllers.py
ccs_connect_tiktok/controllers/tt_controllers.py
+8
-2
没有找到文件。
ccs_base/models/cc_bill_loading.py
浏览文件 @
f593d755
...
...
@@ -318,13 +318,12 @@ class CcShipPackage(models.Model):
string
=
'Invoice Attachments'
)
# 进度状态, 包括已提货、 小包查验、海关放行、小包出库、小包入库、清关失败,包裹交接
state
=
fields
.
Many2one
(
'cc.node'
,
string
=
'Progress state'
,
domain
=
"[('node_type', '=', 'package')]"
,
default
=
lambda
self
:
self
.
env
[
'cc.node'
]
.
search
([(
'node_type'
,
'='
,
'package'
),
(
'is_default'
,
'='
,
True
)],
limit
=
1
))
state
=
fields
.
Many2one
(
'cc.node'
,
string
=
'Progress state'
,
domain
=
"[('node_type', '=', 'package')]"
,
default
=
lambda
self
:
self
.
env
[
'cc.node'
]
.
search
(
[(
'node_type'
,
'='
,
'package'
),
(
'is_default'
,
'='
,
True
)],
limit
=
1
))
node_exception_reason_id
=
fields
.
Many2one
(
'cc.node.exception.reason'
,
'Exception Reason'
)
process_time
=
fields
.
Datetime
(
'Process Time(UTC)'
)
# 重载write方法,在进度状态变化时,将is_sync置为False, 同时检查is_sync为false时,不允许修改进度状态
def
write
(
self
,
vals
):
# if not self.is_sync and 'state' in vals:
...
...
@@ -346,7 +345,6 @@ class CcShipPackage(models.Model):
vals
[
'is_sync'
]
=
False
return
super
(
CcShipPackage
,
self
)
.
write
(
vals
)
# 增加是否允许取消的检查方法,当小包状态为小包查验、海关放行、小包出库、清关失败,包裹交接时,不允许取消
def
check_cancel
(
self
):
if
self
.
is_cancel
:
...
...
@@ -715,7 +713,7 @@ class CcBL(models.Model):
# }
# 添加计算方法,根据bl_line_ids计算bl_total_line,bl_total_qty,bl_total_amount
@api.depends
(
'ship_package_ids'
)
@api.depends
(
'ship_package_ids'
,
'ship_package_ids.big_package_id'
)
def
_compute_bl_total
(
self
):
for
bl
in
self
:
bl
.
bl_total_amount
=
sum
(
line
.
total_value
for
line
in
bl
.
ship_package_ids
)
...
...
ccs_base/models/cc_node.py
浏览文件 @
f593d755
...
...
@@ -43,3 +43,5 @@ class CcNode(models.Model):
(
'bl'
,
'Bill of Loading'
),
(
'package'
,
'Package'
)
],
string
=
'Node Type'
,
default
=
'bl'
)
next_code_ids
=
fields
.
Many2many
(
'cc.node'
,
'node_next_node_rel'
,
'node_id'
,
'next_node_id'
,
'Next Node'
,
domain
=
"[('node_type','=',node_type)]"
)
ccs_base/views/cc_node_view.xml
浏览文件 @
f593d755
...
...
@@ -6,11 +6,12 @@
<field
name=
"name"
>
tree.cc.node
</field>
<field
name=
"model"
>
cc.node
</field>
<field
name=
"arch"
type=
"xml"
>
<tree
string=
"CC Node"
editable=
"bottom"
>
<tree
string=
"CC Node"
editable=
"bottom"
>
<field
optional=
"show"
name=
"seq"
string=
"Node Sequence"
widget=
"handle"
/>
<field
optional=
"show"
name=
"node_type"
string=
"Node Type"
/>
<field
optional=
"show"
name=
"name"
string=
"Node Name"
/>
<field
optional=
"show"
name=
"desc"
string=
"Node Description"
/>
<field
optional=
"show"
name=
"next_code_ids"
widget=
"many2many_tags"
options=
"{'no_create':True}"
/>
<field
optional=
"show"
name=
"is_must"
string=
"Is Must Node"
/>
<field
optional=
"show"
name=
"is_done"
string=
"Is Done Node"
/>
<field
optional=
"show"
name=
"is_default"
string=
"Is Current Node"
/>
...
...
@@ -26,7 +27,6 @@
<search
string=
"Search Node"
>
<field
name=
"name"
string=
"Node Name"
/>
<field
name=
"desc"
string=
"Node Description"
/>
<group
expand=
"0"
string=
"Group By"
>
<filter
string=
"Node Type"
name=
"group_node_type"
context=
"{'group_by':'node_type'}"
/>
</group>
...
...
ccs_base/wizard/batch_input_ship_package_statu_wizard.py
浏览文件 @
f593d755
...
...
@@ -32,6 +32,8 @@ class BatchInputShipPackageStatusWizard(models.TransientModel):
],
string
=
'Select Type'
,
default
=
'node'
)
current_status
=
fields
.
Many2one
(
'cc.node'
,
'Select Node'
)
next_code_ids
=
fields
.
Many2many
(
'cc.node'
,
'node_next_node_wizard_rel'
,
'node_id'
,
'next_node_id'
,
'Next Node'
,
related
=
'current_status.next_code_ids'
)
update_status
=
fields
.
Many2one
(
'cc.node'
,
'Update Node'
)
select_tracking_no
=
fields
.
Text
(
'Select TrackingNo'
,
help
=
'A TrackingNo no is one line'
)
exclude_tracking_no
=
fields
.
Text
(
'Exclude TrackingNo'
,
help
=
'A TrackingNo no is one line'
)
...
...
ccs_base/wizard/batch_input_ship_package_statu_wizard.xml
浏览文件 @
f593d755
...
...
@@ -14,12 +14,18 @@
<group>
<field
name=
"bl_id"
required=
"1"
/>
<field
name=
"select_type"
required=
"1"
/>
<field
name=
"current_status"
attrs=
"{'invisible':[('select_type','=','tracking_no')],'required':[('select_type','=','node')]}"
domain=
"[('node_type','=','package')]"
/>
<field
name=
"exclude_tracking_no"
attrs=
"{'invisible':[('select_type','=','tracking_no')]}"
/>
<field
name=
"select_tracking_no"
attrs=
"{'invisible':[('select_type','=','node')],'required':[('select_type','=','tracking_no')]}"
/>
<field
name=
"current_status"
attrs=
"{'invisible':[('select_type','=','tracking_no')],'required':[('select_type','=','node')]}"
domain=
"[('node_type','=','package')]"
/>
<field
name=
"next_code_ids"
invisible=
"1"
/>
<field
name=
"exclude_tracking_no"
attrs=
"{'invisible':[('select_type','=','tracking_no')]}"
/>
<field
name=
"select_tracking_no"
attrs=
"{'invisible':[('select_type','=','node')],'required':[('select_type','=','tracking_no')]}"
/>
<field
name=
"update_package_count"
/>
<separator/>
<field
name=
"update_status"
required=
"1"
domain=
"[('node_type','=','package')]"
/>
<field
name=
"update_status"
required=
"1"
domain=
"[('id','in',next_code_ids),('node_type','=','package')]"
/>
<field
name=
"process_time"
required=
"1"
string=
"Process Time(UTC)"
/>
<field
name=
"node_exception_reason_id"
options=
"{'no_create':True}"
/>
<field
name=
"state_explain"
/>
...
...
@@ -28,7 +34,8 @@
<field
name=
"is_ok"
/>
</group>
<footer>
<button
name=
"submit"
type=
"object"
string=
"Submit"
class=
"oe_highlight"
attrs=
"{'invisible':[('is_ok','=',False)]}"
/>
<button
name=
"submit"
type=
"object"
string=
"Submit"
class=
"oe_highlight"
attrs=
"{'invisible':[('is_ok','=',False)]}"
/>
<button
string=
"Close"
special=
"cancel"
/>
</footer>
</sheet>
...
...
ccs_connect_tiktok/controllers/tt_controllers.py
浏览文件 @
f593d755
...
...
@@ -269,15 +269,21 @@ class TTApi(http.Controller):
# 检查提单是否已经存在,且未被取消,如果存在则不再生成
bl
=
request
.
env
[
'cc.bl'
]
.
sudo
()
.
search
(
[(
'bl_no'
,
'='
,
kws
.
get
(
'master_waybill_no'
)),
(
'is_cancel'
,
'='
,
False
)],
limit
=
1
)
declare_type
=
kws
.
get
(
'declare_type'
)
if
declare_type
:
declare_type
=
declare_type
.
lower
()
if
not
bl
:
if
kws
.
get
(
'declare_type'
)
==
'C
reate'
:
if
declare_type
==
'c
reate'
:
bl
=
request
.
env
[
'cc.bl'
]
.
sudo
()
.
create
(
bl_vals
)
else
:
if
kws
.
get
(
'declare_type'
)
==
'U
pdate'
and
bl
.
state
==
'draft'
:
if
declare_type
==
'u
pdate'
and
bl
.
state
==
'draft'
:
bl
.
write
(
bl_vals
)
# 生成cc.big.package
big_bag_list
=
kws
.
get
(
'big_bag_list'
)
if
big_bag_list
and
len
(
big_bag_list
)
>
0
:
# 删除大包数据
for
package
in
bl
.
big_package_ids
:
package
.
unlink
()
for
big_bag
in
big_bag_list
:
big_bag_no
=
big_bag
.
get
(
'big_bag_no'
)
# 检查big_bag_no是否已经存在
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论