提交 8f8ddcb9 authored 作者: 贺阳's avatar 贺阳

1、清关中可操作“完成”,点击“完成”进行提单巡查的逻辑,没有问题的,则可变成已完成。有问题的进行提示。权限归清关员/清关经理

2、已完成可点击“追回”,追回变成清关中 3、清关中到已完成支持批量操作 4、根据小包状态自动变成已完成时,也需检查要进行提单巡查的逻辑,有问题的发邮件
上级 d424a312
......@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-07-15 02:39+0000\n"
"PO-Revision-Date: 2025-07-15 10:45+0800\n"
"POT-Creation-Date: 2025-09-18 08:29+0000\n"
"PO-Revision-Date: 2025-09-18 16:30+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: zh_CN\n"
......@@ -531,6 +531,11 @@ msgstr "批量"
msgid "Batch Add Package Exception Information"
msgstr "批量添加异常信息"
#. module: ccs_base
#: model:ir.actions.server,name:ccs_base.bl_complete_server_action
msgid "Batch Complete"
msgstr "批量完成"
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_update_transfer_bl_no_wizard
msgid "Batch Link Transfer B/L No"
......@@ -586,15 +591,6 @@ msgstr "大包"
msgid "Big Package No"
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
#: 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
......@@ -959,6 +955,11 @@ msgstr "公司"
msgid "Company Code"
msgstr "公司编码"
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_bl_view
msgid "Complete"
msgstr "完成"
#. module: ccs_base
#: model:ir.model,name:ccs_base.model_res_config_settings
msgid "Config Settings"
......@@ -2385,6 +2386,13 @@ msgstr ""
msgid "ONLINE SELLING PLACE"
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
#. odoo-python
#: code:addons/ccs_base/wizard/batch_update_transfer_bl_no_wizard.py:0
......@@ -2392,6 +2400,13 @@ msgstr "网上销售网站"
msgid "Only excel files can be uploaded!"
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
#: 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
......@@ -2692,6 +2707,11 @@ msgstr "收件人邮政编码"
msgid "Real Weight"
msgstr "实际重量"
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_bl_view
msgid "Recall"
msgstr "追回"
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.tree_cc_bl_view
msgid "Receive Big Package"
......@@ -3390,13 +3410,6 @@ msgstr "使用日期不能大于当前日期!"
msgid "This B/L No does not exist in the system"
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
#: 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
......@@ -3518,6 +3531,7 @@ msgstr "转单号必填"
#. module: ccs_base
#. odoo-python
#: 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
msgid "Transfer B/L No. cannot be the same as B/L No."
msgstr "转单号不能与提单号相同。"
......@@ -3525,6 +3539,7 @@ msgstr "转单号不能与提单号相同。"
#. module: ccs_base
#. odoo-python
#: 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
msgid "Transfer B/L No. cannot be the same as B/L No. or Transfer B/L No."
msgstr "转单号不能与提单号或转单号相同。"
......
......@@ -810,7 +810,14 @@ class CcBL(models.Model):
if item.state == 'draft':
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):
if item.state == 'ccing':
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
# 创建显示大包的action
def action_show_big_package(self):
......
......@@ -59,7 +59,19 @@
string="Update Bill Of Loading Status"
context="{'active_id': id,'default_bl_id': active_id,
'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>
<field name="customs_clearance_status" widget="statusbar"/>
......@@ -432,4 +444,18 @@
</field>
</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>
\ No newline at end of file
......@@ -2,8 +2,9 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
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):
state_explain = fields.Text('State Explain', help='State Explain')
node_exception_reason_id = fields.Many2one('cc.node.exception.reason', 'Exception Reason',
domain="[('code_id', '=', update_status)]")
# 批量更新小包状态
def submit(self):
# 确认数据
......@@ -89,7 +91,8 @@ class BatchInputShipPackageStatusWizard(models.TransientModel):
raise ValidationError('Please confirm that the above data is correct.') # 请确认以上数据正确
parcels = self.get_process_package()
logging.info(
'更新小包状态的小包:%s,当前状态:%s,更新状态:%s' % (parcels, self.current_status, self.update_status))
if not parcels:
raise ValidationError(_('No package to update found.')) # 没有找到要更新的小包
# 1.若选择的更新节点为是当前节点【清关节点设置,是当前节点字段名称改为初始节点】,当更新节点为初始节点时,无需填写操作时间;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论