Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hh_ccs
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
贺阳
hh_ccs
Commits
8f8ddcb9
提交
8f8ddcb9
authored
9月 18, 2025
作者:
贺阳
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1、清关中可操作“完成”,点击“完成”进行提单巡查的逻辑,没有问题的,则可变成已完成。有问题的进行提示。权限归清关员/清关经理
2、已完成可点击“追回”,追回变成清关中 3、清关中到已完成支持批量操作 4、根据小包状态自动变成已完成时,也需检查要进行提单巡查的逻辑,有问题的发邮件
上级
d424a312
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
85 行增加
和
26 行删除
+85
-26
zh_CN.po
ccs_base/i18n/zh_CN.po
+33
-18
cc_bill_loading.py
ccs_base/models/cc_bill_loading.py
+15
-1
cc_bl_view.xml
ccs_base/views/cc_bl_view.xml
+28
-1
batch_input_ship_package_statu_wizard.py
ccs_base/wizard/batch_input_ship_package_statu_wizard.py
+9
-6
bl_patrol.py
ccs_connect_tiktok/models/bl_patrol.py
+0
-0
cc_bill_loading.py
ccs_connect_tiktok/models/cc_bill_loading.py
+0
-0
没有找到文件。
ccs_base/i18n/zh_CN.po
浏览文件 @
8f8ddcb9
...
@@ -6,8 +6,8 @@ msgid ""
...
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-0
7-15 02:3
9+0000\n"
"POT-Creation-Date: 2025-0
9-18 08:2
9+0000\n"
"PO-Revision-Date: 2025-0
7-15 10:45
+0800\n"
"PO-Revision-Date: 2025-0
9-18 16:30
+0800\n"
"Last-Translator: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language-Team: \n"
"Language: zh_CN\n"
"Language: zh_CN\n"
...
@@ -531,6 +531,11 @@ msgstr "批量"
...
@@ -531,6 +531,11 @@ msgstr "批量"
msgid "Batch Add Package Exception Information"
msgid "Batch Add Package Exception Information"
msgstr "批量添加异常信息"
msgstr "批量添加异常信息"
#. module: ccs_base
#: model:ir.actions.server,name:ccs_base.bl_complete_server_action
msgid "Batch Complete"
msgstr "批量完成"
#. module: ccs_base
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_update_transfer_bl_no_wizard
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_update_transfer_bl_no_wizard
msgid "Batch Link Transfer B/L No"
msgid "Batch Link Transfer B/L No"
...
@@ -586,15 +591,6 @@ msgstr "大包"
...
@@ -586,15 +591,6 @@ msgstr "大包"
msgid "Big Package No"
msgid "Big Package No"
msgstr "大包号"
msgstr "大包号"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/wizard/associate_pallet_wizard.py:0
#, python-format
msgid ""
"Big Package No :%s ,The same bill of lading, same pallet number, and usage "
"date must be consistent!"
msgstr "大包号:%s ,同一提单、同一托盘号的使用日期必须一致!"
#. module: ccs_base
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_big_package__big_package_no
#: model:ir.model.fields,field_description:ccs_base.field_cc_big_package__big_package_no
#: model:ir.model.fields,field_description:ccs_base.field_cc_history_big_package__big_package_no
#: model:ir.model.fields,field_description:ccs_base.field_cc_history_big_package__big_package_no
...
@@ -959,6 +955,11 @@ msgstr "公司"
...
@@ -959,6 +955,11 @@ msgstr "公司"
msgid "Company Code"
msgid "Company Code"
msgstr "公司编码"
msgstr "公司编码"
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_bl_view
msgid "Complete"
msgstr "完成"
#. module: ccs_base
#. module: ccs_base
#: model:ir.model,name:ccs_base.model_res_config_settings
#: model:ir.model,name:ccs_base.model_res_config_settings
msgid "Config Settings"
msgid "Config Settings"
...
@@ -2385,6 +2386,13 @@ msgstr ""
...
@@ -2385,6 +2386,13 @@ msgstr ""
msgid "ONLINE SELLING PLACE"
msgid "ONLINE SELLING PLACE"
msgstr "网上销售网站"
msgstr "网上销售网站"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/models/cc_bill_loading.py:0
#, python-format
msgid "Only completed bills of loading can be recalled!"
msgstr "只有已完成状态的提单可以追回!"
#. module: ccs_base
#. module: ccs_base
#. odoo-python
#. odoo-python
#: code:addons/ccs_base/wizard/batch_update_transfer_bl_no_wizard.py:0
#: code:addons/ccs_base/wizard/batch_update_transfer_bl_no_wizard.py:0
...
@@ -2392,6 +2400,13 @@ msgstr "网上销售网站"
...
@@ -2392,6 +2400,13 @@ msgstr "网上销售网站"
msgid "Only excel files can be uploaded!"
msgid "Only excel files can be uploaded!"
msgstr "只能上传excel文件!"
msgstr "只能上传excel文件!"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/models/cc_bill_loading.py:0
#, python-format
msgid "Only the status of the bill of loading is ccing can be completed!"
msgstr "只有清关中状态的提单可以完成!"
#. module: ccs_base
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_history_package_sync_log__operate_remark
#: model:ir.model.fields,field_description:ccs_base.field_cc_history_package_sync_log__operate_remark
#: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_history_package_sync_log_view
#: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_history_package_sync_log_view
...
@@ -2692,6 +2707,11 @@ msgstr "收件人邮政编码"
...
@@ -2692,6 +2707,11 @@ msgstr "收件人邮政编码"
msgid "Real Weight"
msgid "Real Weight"
msgstr "实际重量"
msgstr "实际重量"
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_bl_view
msgid "Recall"
msgstr "追回"
#. module: ccs_base
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.tree_cc_bl_view
#: model_terms:ir.ui.view,arch_db:ccs_base.tree_cc_bl_view
msgid "Receive Big Package"
msgid "Receive Big Package"
...
@@ -3390,13 +3410,6 @@ msgstr "使用日期不能大于当前日期!"
...
@@ -3390,13 +3410,6 @@ msgstr "使用日期不能大于当前日期!"
msgid "This B/L No does not exist in the system"
msgid "This B/L No does not exist in the system"
msgstr "提单号在系统不存在"
msgstr "提单号在系统不存在"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/wizard/batch_update_transfer_bl_no_wizard.py:0
#, python-format
msgid "This Transfer B/L No already exists"
msgstr "转单号已存在"
#. module: ccs_base
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.search_cc_big_package_view
#: model_terms:ir.ui.view,arch_db:ccs_base.search_cc_big_package_view
#: model_terms:ir.ui.view,arch_db:ccs_base.search_cc_history_big_package_view
#: model_terms:ir.ui.view,arch_db:ccs_base.search_cc_history_big_package_view
...
@@ -3518,6 +3531,7 @@ msgstr "转单号必填"
...
@@ -3518,6 +3531,7 @@ msgstr "转单号必填"
#. module: ccs_base
#. module: ccs_base
#. odoo-python
#. odoo-python
#: code:addons/ccs_base/models/cc_bill_loading.py:0
#: code:addons/ccs_base/models/cc_bill_loading.py:0
#: code:addons/ccs_base/wizard/batch_update_transfer_bl_no_wizard.py:0
#, python-format
#, python-format
msgid "Transfer B/L No. cannot be the same as B/L No."
msgid "Transfer B/L No. cannot be the same as B/L No."
msgstr "转单号不能与提单号相同。"
msgstr "转单号不能与提单号相同。"
...
@@ -3525,6 +3539,7 @@ msgstr "转单号不能与提单号相同。"
...
@@ -3525,6 +3539,7 @@ msgstr "转单号不能与提单号相同。"
#. module: ccs_base
#. module: ccs_base
#. odoo-python
#. odoo-python
#: code:addons/ccs_base/models/cc_bill_loading.py:0
#: code:addons/ccs_base/models/cc_bill_loading.py:0
#: code:addons/ccs_base/wizard/batch_update_transfer_bl_no_wizard.py:0
#, python-format
#, python-format
msgid "Transfer B/L No. cannot be the same as B/L No. or Transfer B/L No."
msgid "Transfer B/L No. cannot be the same as B/L No. or Transfer B/L No."
msgstr "转单号不能与提单号或转单号相同。"
msgstr "转单号不能与提单号或转单号相同。"
...
...
ccs_base/models/cc_bill_loading.py
浏览文件 @
8f8ddcb9
...
@@ -810,7 +810,14 @@ class CcBL(models.Model):
...
@@ -810,7 +810,14 @@ class CcBL(models.Model):
if
item
.
state
==
'draft'
:
if
item
.
state
==
'draft'
:
item
.
state
=
'ccing'
item
.
state
=
'ccing'
def
done_func
(
self
):
def
complete_func
(
self
):
"""点完成按钮,状态变为已完成"""
for
item
in
self
:
if
item
.
state
!=
'ccing'
:
raise
ValidationError
(
_
(
'Only the status of the bill of loading is ccing can be completed!'
))
#只有清关中状态的提单可以完成
item
.
done_func
()
def
done_func
(
self
,
is_email
=
False
):
"""
"""
变为已完成
变为已完成
"""
"""
...
@@ -818,6 +825,13 @@ class CcBL(models.Model):
...
@@ -818,6 +825,13 @@ class CcBL(models.Model):
if
item
.
state
==
'ccing'
:
if
item
.
state
==
'ccing'
:
item
.
state
=
'done'
item
.
state
=
'done'
def
action_recall
(
self
):
"""追回操作,将状态从已完成改为清关中"""
for
record
in
self
:
if
record
.
state
!=
'done'
:
raise
ValidationError
(
_
(
'Only completed bills of loading can be recalled!'
))
#只有已完成状态的提单可以追回
record
.
state
=
'ccing'
# 定义3个方法,分别创建显示该提单大包,包裹,商品的action
# 定义3个方法,分别创建显示该提单大包,包裹,商品的action
# 创建显示大包的action
# 创建显示大包的action
def
action_show_big_package
(
self
):
def
action_show_big_package
(
self
):
...
...
ccs_base/views/cc_bl_view.xml
浏览文件 @
8f8ddcb9
...
@@ -59,7 +59,19 @@
...
@@ -59,7 +59,19 @@
string=
"Update Bill Of Loading Status"
string=
"Update Bill Of Loading Status"
context=
"{'active_id': id,'default_bl_id': active_id,
context=
"{'active_id': id,'default_bl_id': active_id,
'default_last_process_time':process_time,'default_current_status':customs_clearance_status}"
/>
'default_last_process_time':process_time,'default_current_status':customs_clearance_status}"
/>
<field
name=
"state"
widget=
"statusbar"
options=
"{'clickable': '1'}"
/>
<!-- 完成按钮 - 仅在清关中状态显示,仅清关员和清关经理可操作 -->
<button
name=
"complete_func"
type=
"object"
class=
"oe_highlight"
string=
"Complete"
attrs=
"{'invisible': [('state', '!=', 'ccing')]}"
groups=
"ccs_base.group_clearance_of_customs_user,ccs_base.group_clearance_of_customs_manager"
/>
<!-- 追回按钮 - 仅在已完成状态显示,仅清关员和清关经理可操作 -->
<button
name=
"action_recall"
type=
"object"
string=
"Recall"
attrs=
"{'invisible': [('state', '!=', 'done')]}"
groups=
"ccs_base.group_clearance_of_customs_user,ccs_base.group_clearance_of_customs_manager"
/>
<field
name=
"state"
widget=
"statusbar"
/>
<!-- options="{'clickable': '1'}" -->
</header>
</header>
<header>
<header>
<field
name=
"customs_clearance_status"
widget=
"statusbar"
/>
<field
name=
"customs_clearance_status"
widget=
"statusbar"
/>
...
@@ -432,4 +444,18 @@
...
@@ -432,4 +444,18 @@
</field>
</field>
</record>
</record>
<record
id=
"bl_complete_server_action"
model=
"ir.actions.server"
>
<field
name=
"name"
>
Batch Complete
</field>
<field
name=
"model_id"
ref=
"model_cc_bl"
/>
<field
name=
"binding_model_id"
ref=
"model_cc_bl"
/>
<field
name=
"state"
>
code
</field>
<field
name=
"binding_view_types"
>
list
</field>
<field
name=
"groups_id"
eval=
"[(4, ref('ccs_base.group_clearance_of_customs_user'))]"
/>
<field
name=
"code"
>
if records:
action = records.complete_func()
</field>
</record>
</odoo>
</odoo>
\ No newline at end of file
ccs_base/wizard/batch_input_ship_package_statu_wizard.py
浏览文件 @
8f8ddcb9
...
@@ -2,8 +2,9 @@
...
@@ -2,8 +2,9 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import
logging
import
logging
from
odoo
import
models
,
api
,
fields
,
_
from
odoo
import
models
,
api
,
fields
,
_
from
odoo.exceptions
import
Warning
,
ValidationError
from
odoo.exceptions
import
ValidationError
# 定义一个批量更新小包状态的向导, 用于批量更新小包状态
# 定义一个批量更新小包状态的向导, 用于批量更新小包状态
...
@@ -82,6 +83,7 @@ class BatchInputShipPackageStatusWizard(models.TransientModel):
...
@@ -82,6 +83,7 @@ class BatchInputShipPackageStatusWizard(models.TransientModel):
state_explain
=
fields
.
Text
(
'State Explain'
,
help
=
'State Explain'
)
state_explain
=
fields
.
Text
(
'State Explain'
,
help
=
'State Explain'
)
node_exception_reason_id
=
fields
.
Many2one
(
'cc.node.exception.reason'
,
'Exception Reason'
,
node_exception_reason_id
=
fields
.
Many2one
(
'cc.node.exception.reason'
,
'Exception Reason'
,
domain
=
"[('code_id', '=', update_status)]"
)
domain
=
"[('code_id', '=', update_status)]"
)
# 批量更新小包状态
# 批量更新小包状态
def
submit
(
self
):
def
submit
(
self
):
# 确认数据
# 确认数据
...
@@ -89,7 +91,8 @@ class BatchInputShipPackageStatusWizard(models.TransientModel):
...
@@ -89,7 +91,8 @@ class BatchInputShipPackageStatusWizard(models.TransientModel):
raise
ValidationError
(
'Please confirm that the above data is correct.'
)
# 请确认以上数据正确
raise
ValidationError
(
'Please confirm that the above data is correct.'
)
# 请确认以上数据正确
parcels
=
self
.
get_process_package
()
parcels
=
self
.
get_process_package
()
logging
.
info
(
'更新小包状态的小包:
%
s,当前状态:
%
s,更新状态:
%
s'
%
(
parcels
,
self
.
current_status
,
self
.
update_status
))
if
not
parcels
:
if
not
parcels
:
raise
ValidationError
(
_
(
'No package to update found.'
))
# 没有找到要更新的小包
raise
ValidationError
(
_
(
'No package to update found.'
))
# 没有找到要更新的小包
# 1.若选择的更新节点为是当前节点【清关节点设置,是当前节点字段名称改为初始节点】,当更新节点为初始节点时,无需填写操作时间;
# 1.若选择的更新节点为是当前节点【清关节点设置,是当前节点字段名称改为初始节点】,当更新节点为初始节点时,无需填写操作时间;
...
@@ -106,7 +109,7 @@ class BatchInputShipPackageStatusWizard(models.TransientModel):
...
@@ -106,7 +109,7 @@ class BatchInputShipPackageStatusWizard(models.TransientModel):
# 更新状态
# 更新状态
parcels
.
write
(
parcels
.
write
(
{
'state'
:
self
.
update_status
.
id
,
'node_exception_reason_id'
:
self
.
node_exception_reason_id
.
id
,
{
'state'
:
self
.
update_status
.
id
,
'node_exception_reason_id'
:
self
.
node_exception_reason_id
.
id
,
'process_time'
:
self
.
process_time
,
'state_explain'
:
self
.
state_explain
,
'is_sync'
:
is_sync
})
'process_time'
:
self
.
process_time
,
'state_explain'
:
self
.
state_explain
,
'is_sync'
:
is_sync
})
# if parcels:
# if parcels:
# where_sql = " where id={0}".format(parcels[0].id) if len(
# where_sql = " where id={0}".format(parcels[0].id) if len(
# parcels) == 1 else " where id in {0}".format(tuple(parcels.ids))
# parcels) == 1 else " where id in {0}".format(tuple(parcels.ids))
...
@@ -116,9 +119,9 @@ class BatchInputShipPackageStatusWizard(models.TransientModel):
...
@@ -116,9 +119,9 @@ class BatchInputShipPackageStatusWizard(models.TransientModel):
# where_sql)
# where_sql)
# update_sql = update_sql.replace("'False'", "null").replace("False", "null")
# update_sql = update_sql.replace("'False'", "null").replace("False", "null")
# self._cr.execute(update_sql)
# self._cr.execute(update_sql)
# parcels.write({'state': self.update_status.id})
# parcels.write({'state': self.update_status.id})
# for parcel in parcels:
# for parcel in parcels:
# parcel.message_post(body='%s改为%s' % (self.current_status.name, self.update_status.name))
# parcel.message_post(body='%s改为%s' % (self.current_status.name, self.update_status.name))
# 生成sns日志
# 生成sns日志
# self.bl_id.message_post(body='%s更新为%s' % (self.current_status.name or '', self.update_status.name or ''))
# self.bl_id.message_post(body='%s更新为%s' % (self.current_status.name or '', self.update_status.name or ''))
# 跳转显示本次更新状态的小包 更新小包状态
# 跳转显示本次更新状态的小包 更新小包状态
...
...
ccs_connect_tiktok/models/bl_patrol.py
浏览文件 @
8f8ddcb9
差异被折叠。
点击展开。
ccs_connect_tiktok/models/cc_bill_loading.py
浏览文件 @
8f8ddcb9
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论