提交 0d147b3d authored 作者: 贺阳's avatar 贺阳

翻译

上级 91014d40
...@@ -6,11 +6,11 @@ msgid "" ...@@ -6,11 +6,11 @@ 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-10-31 02:13+0000\n" "POT-Creation-Date: 2025-12-04 01:28+0000\n"
"PO-Revision-Date: 2025-10-31 10:14+0800\n" "PO-Revision-Date: 2025-12-04 09:36+0800\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: zh_CN\n" "Language: zh\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
...@@ -60,13 +60,6 @@ msgstr "%s %s 操作了异常信息,异常原因:%s,未发送%s邮件" ...@@ -60,13 +60,6 @@ msgstr "%s %s 操作了异常信息,异常原因:%s,未发送%s邮件"
msgid "%s bill of loading cannot find release note file" msgid "%s bill of loading cannot find release note file"
msgstr "%s 提单无法找到release note文件" msgstr "%s 提单无法找到release note文件"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/wizard/batch_get_pod_info_wizard.py:0
#, python-format
msgid "%s bill of loading cannot get node operation time,please manually upload push tk"
msgstr "%s提单号没有获取到节点操作时间,请手动上传推送tk"
#. module: ccs_base #. module: ccs_base
#: model:mail.template,body_html:ccs_base.email_template_exception_notification_en #: model:mail.template,body_html:ccs_base.email_template_exception_notification_en
msgid "" msgid ""
...@@ -199,11 +192,22 @@ msgstr "" ...@@ -199,11 +192,22 @@ msgstr ""
" </span>" " </span>"
#. module: ccs_base #. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_create_and_get_pod_info_wizard_form
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_get_pod_info_wizard_form #: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_get_pod_info_wizard_form
msgid "<strong>Description:</strong>" msgid "<strong>Description:</strong>"
msgstr "<strong>说明:</strong>" msgstr "<strong>说明:</strong>"
#. module: ccs_base #. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_create_and_get_pod_info_wizard_form
msgid ""
"<strong>Get Last Mile POD:</strong>\n"
" Generate a last mile POD (Proof of Delivery) attachment "
"information, including\n"
" big package quantities and container numbers"
msgstr "<strong>获取尾程POD:</strong>生成一条尾程交接POD(待大包数量和箱号)的附件信息"
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_create_and_get_pod_info_wizard_form
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_get_pod_info_wizard_form #: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_get_pod_info_wizard_form
msgid "" msgid ""
"<strong>Remove Specified Text:</strong>\n" "<strong>Remove Specified Text:</strong>\n"
...@@ -298,6 +302,7 @@ msgstr "" ...@@ -298,6 +302,7 @@ msgstr ""
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_add_exception_info_wizard__action_type #: model:ir.model.fields,field_description:ccs_base.field_add_exception_info_wizard__action_type
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__action_type
#: model:ir.model.fields,field_description:ccs_base.field_export_bl_big_package_xlsx_wizard__action_type #: model:ir.model.fields,field_description:ccs_base.field_export_bl_big_package_xlsx_wizard__action_type
msgid "Action Type" msgid "Action Type"
msgstr "动作类型" msgstr "动作类型"
...@@ -567,6 +572,17 @@ msgstr "提单号和转单号重复" ...@@ -567,6 +572,17 @@ msgstr "提单号和转单号重复"
msgid "B/L No is required" msgid "B/L No is required"
msgstr "提单号必填" msgstr "提单号必填"
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_bl__bl_type
#: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_bl_view
msgid "B/L Type"
msgstr "提单类型"
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__bl_numbers
msgid "BL Number"
msgstr "提单号"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_bl__bl_attachment_ids #: model:ir.model.fields,field_description:ccs_base.field_cc_bl__bl_attachment_ids
msgid "B\\L Attachments" msgid "B\\L Attachments"
...@@ -594,6 +610,23 @@ msgstr "批量添加异常信息" ...@@ -594,6 +610,23 @@ msgstr "批量添加异常信息"
msgid "Batch Complete" msgid "Batch Complete"
msgstr "批量完成" msgstr "批量完成"
#. module: ccs_base
#. odoo-javascript
#: code:addons/ccs_base/static/src/views/list.xml:0
#, python-format
msgid "Batch Create B/L"
msgstr "批量创建提单"
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_create_and_get_pod_info_wizard_form
msgid "Batch Create and Get POD Info"
msgstr "批量创建提单并获取尾程POD信息"
#. module: ccs_base
#: model:ir.actions.server,name:ccs_base.bl_download_pod_server_action
msgid "Batch Download POD"
msgstr "批量下载POD"
#. 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
...@@ -708,7 +741,7 @@ msgid "Bill Of Loading Last Process Time" ...@@ -708,7 +741,7 @@ msgid "Bill Of Loading Last Process Time"
msgstr "提单最后推送时间" msgstr "提单最后推送时间"
#. module: ccs_base #. module: ccs_base
#: model:ir.actions.act_window,name:ccs_base.action_cc_bl model:ir.model,name:ccs_base.model_cc_bl #: model:ir.model,name:ccs_base.model_cc_bl
#: model:ir.model.fields,field_description:ccs_base.field_batch_input_ship_package_status_wizard__bl_id #: model:ir.model.fields,field_description:ccs_base.field_batch_input_ship_package_status_wizard__bl_id
#: model:ir.model.fields,field_description:ccs_base.field_cc_big_package__bl_id #: model:ir.model.fields,field_description:ccs_base.field_cc_big_package__bl_id
#: model:ir.model.fields,field_description:ccs_base.field_cc_clearance_file__bl_id #: model:ir.model.fields,field_description:ccs_base.field_cc_clearance_file__bl_id
...@@ -720,7 +753,6 @@ msgstr "提单最后推送时间" ...@@ -720,7 +753,6 @@ msgstr "提单最后推送时间"
#: model:ir.model.fields,field_description:ccs_base.field_cc_ship_package__bl_id #: model:ir.model.fields,field_description:ccs_base.field_cc_ship_package__bl_id
#: model:ir.model.fields,field_description:ccs_base.field_update_bl_status_wizard__bl_id #: model:ir.model.fields,field_description:ccs_base.field_update_bl_status_wizard__bl_id
#: model:ir.model.fields.selection,name:ccs_base.selection__cc_node__node_type__bl #: model:ir.model.fields.selection,name:ccs_base.selection__cc_node__node_type__bl
#: model:ir.ui.menu,name:ccs_base.menu_cc_bl
#: model_terms:ir.ui.view,arch_db:ccs_base.calendar_cc_bl_view #: model_terms:ir.ui.view,arch_db:ccs_base.calendar_cc_bl_view
#: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_big_package_view #: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_big_package_view
#: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_bl_view #: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_bl_view
...@@ -739,7 +771,6 @@ msgstr "提单最后推送时间" ...@@ -739,7 +771,6 @@ msgstr "提单最后推送时间"
#: model_terms:ir.ui.view,arch_db:ccs_base.search_cc_progress_view #: model_terms:ir.ui.view,arch_db:ccs_base.search_cc_progress_view
#: model_terms:ir.ui.view,arch_db:ccs_base.search_cc_ship_package_view #: model_terms:ir.ui.view,arch_db:ccs_base.search_cc_ship_package_view
#: model_terms:ir.ui.view,arch_db:ccs_base.tree_cc_big_package_view #: model_terms:ir.ui.view,arch_db:ccs_base.tree_cc_big_package_view
#: model_terms:ir.ui.view,arch_db:ccs_base.tree_cc_bl_view
#: model_terms:ir.ui.view,arch_db:ccs_base.tree_cc_clearance_file_view #: model_terms:ir.ui.view,arch_db:ccs_base.tree_cc_clearance_file_view
#: model_terms:ir.ui.view,arch_db:ccs_base.tree_cc_history_ship_package_view #: model_terms:ir.ui.view,arch_db:ccs_base.tree_cc_history_ship_package_view
#: model_terms:ir.ui.view,arch_db:ccs_base.tree_cc_package_good_view #: model_terms:ir.ui.view,arch_db:ccs_base.tree_cc_package_good_view
...@@ -1011,6 +1042,7 @@ msgstr "清关文件" ...@@ -1011,6 +1042,7 @@ msgstr "清关文件"
#. module: ccs_base #. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.view_add_exception_info_wizard #: model_terms:ir.ui.view,arch_db:ccs_base.view_add_exception_info_wizard
#: model_terms:ir.ui.view,arch_db:ccs_base.view_associate_pallet_wizard #: model_terms:ir.ui.view,arch_db:ccs_base.view_associate_pallet_wizard
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_create_and_get_pod_info_wizard_form
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_get_pod_info_wizard_form #: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_get_pod_info_wizard_form
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_input_ship_package_wizard #: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_input_ship_package_wizard
#: 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
...@@ -1050,6 +1082,7 @@ msgstr "配置设置" ...@@ -1050,6 +1082,7 @@ msgstr "配置设置"
#. module: ccs_base #. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.view_add_exception_info_wizard #: model_terms:ir.ui.view,arch_db:ccs_base.view_add_exception_info_wizard
#: model_terms:ir.ui.view,arch_db:ccs_base.view_associate_pallet_wizard #: model_terms:ir.ui.view,arch_db:ccs_base.view_associate_pallet_wizard
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_create_and_get_pod_info_wizard_form
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_get_pod_info_wizard_form #: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_get_pod_info_wizard_form
#: model_terms:ir.ui.view,arch_db:ccs_base.view_bl_done_wizard #: model_terms:ir.ui.view,arch_db:ccs_base.view_bl_done_wizard
msgid "Confirm" msgid "Confirm"
...@@ -1095,6 +1128,14 @@ msgstr "快递logo" ...@@ -1095,6 +1128,14 @@ msgstr "快递logo"
msgid "Courier Name" msgid "Courier Name"
msgstr "快递名称" msgstr "快递名称"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/models/cc_bill_loading.py:0
#: code:addons/ccs_base/wizard/batch_get_pod_info_wizard.py:0
#, python-format
msgid "Create TEMU Bill of Loading"
msgstr "创建TEMU提单"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_add_exception_info_wizard__create_uid #: model:ir.model.fields,field_description:ccs_base.field_add_exception_info_wizard__create_uid
#: model:ir.model.fields,field_description:ccs_base.field_associate_pallet_wizard__create_uid #: model:ir.model.fields,field_description:ccs_base.field_associate_pallet_wizard__create_uid
...@@ -1198,6 +1239,7 @@ msgid "Current Status" ...@@ -1198,6 +1239,7 @@ msgid "Current Status"
msgstr "当前状态" msgstr "当前状态"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__partner_id
#: model:ir.model.fields,field_description:ccs_base.field_cc_bl__customer_id #: model:ir.model.fields,field_description:ccs_base.field_cc_bl__customer_id
#: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_bl_view #: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_bl_view
#: model_terms:ir.ui.view,arch_db:ccs_base.search_cc_bl_view #: model_terms:ir.ui.view,arch_db:ccs_base.search_cc_bl_view
...@@ -1424,6 +1466,11 @@ msgstr "目的地港口代码" ...@@ -1424,6 +1466,11 @@ msgstr "目的地港口代码"
msgid "English" msgid "English"
msgstr "英文" msgstr "英文"
#. module: ccs_base
#: model:ir.model.fields,help:ccs_base.field_batch_get_pod_info_wizard__bl_numbers
msgid "Enter multiple BL numbers, one per line"
msgstr "输入多个BL号,每行一个"
#. 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
...@@ -1618,6 +1665,11 @@ msgstr "毛重" ...@@ -1618,6 +1665,11 @@ msgstr "毛重"
msgid "GROSS WEIGHT (KG)" msgid "GROSS WEIGHT (KG)"
msgstr "毛重(公斤)" msgstr "毛重(公斤)"
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__get_last_mile_pod
msgid "Get Last Mile POD"
msgstr "获取尾程POD"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields.selection,name:ccs_base.selection__cc_history_package_good__item_type__gift #: model:ir.model.fields.selection,name:ccs_base.selection__cc_history_package_good__item_type__gift
#: model:ir.model.fields.selection,name:ccs_base.selection__cc_package_good__item_type__gift #: model:ir.model.fields.selection,name:ccs_base.selection__cc_package_good__item_type__gift
...@@ -2733,6 +2785,12 @@ msgstr "摆放区域" ...@@ -2733,6 +2785,12 @@ msgstr "摆放区域"
msgid "Placement Area must be unique !" msgid "Placement Area must be unique !"
msgstr "摆放区域必须唯一!" msgstr "摆放区域必须唯一!"
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_res_partner__platform_type
#: model:ir.model.fields,field_description:ccs_base.field_res_users__platform_type
msgid "Platform Type"
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
...@@ -2748,6 +2806,25 @@ msgstr "请检查导入文件和内容是否正确,请根据模板文件导入 ...@@ -2748,6 +2806,25 @@ msgstr "请检查导入文件和内容是否正确,请根据模板文件导入
msgid "Please configure the default customs clearance status of the bill of loading node type first." msgid "Please configure the default customs clearance status of the bill of loading node type first."
msgstr "请先配置默认的提单节点类型的清关节点" msgstr "请先配置默认的提单节点类型的清关节点"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/models/cc_bill_loading.py:0
#, python-format
msgid "Please configure the tail-end handover POD file of the bill of loading first."
msgstr "请先配置提单的尾部交接POD文件。"
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_create_and_get_pod_info_wizard_form
msgid "Please enter the bill of lading numbers. Multiple entries are allowed, one per line"
msgstr "请输入提单号。允许多次输入,每次一行"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/models/cc_bill_loading.py:0
#, python-format
msgid "Please select at least one bill of loading."
msgstr "请选择至少一个提单。"
#. module: ccs_base #. module: ccs_base
#. odoo-python #. odoo-python
#: code:addons/ccs_base/wizard/batch_input_ship_package_statu_wizard.py:0 #: code:addons/ccs_base/wizard/batch_input_ship_package_statu_wizard.py:0
...@@ -2763,6 +2840,7 @@ msgid "Please upload the B/L data file to be imported first!" ...@@ -2763,6 +2840,7 @@ msgid "Please upload the B/L data file to be imported first!"
msgstr "请先上传需要更新的提单数据文件!" msgstr "请先上传需要更新的提单数据文件!"
#. module: ccs_base #. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_create_and_get_pod_info_wizard_form
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_get_pod_info_wizard_form #: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_get_pod_info_wizard_form
msgid "Preview" msgid "Preview"
msgstr "预览" msgstr "预览"
...@@ -3439,6 +3517,21 @@ msgstr "同步时间" ...@@ -3439,6 +3517,21 @@ msgstr "同步时间"
msgid "SyncTo.." msgid "SyncTo.."
msgstr "同步" msgstr "同步"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/wizard/batch_get_pod_info_wizard.py:0
#: model:ir.actions.act_window,name:ccs_base.action_temu_bl
#: model:ir.model.fields.selection,name:ccs_base.selection__cc_bl__bl_type__temu
#: model:ir.ui.menu,name:ccs_base.menu_temu_cc_bl
#, python-format
msgid "TEMU Bill of Loading"
msgstr "TEMU提单"
#. module: ccs_base
#: model:ir.model.fields.selection,name:ccs_base.selection__res_partner__platform_type__temu
msgid "TEMU Platform"
msgstr "TEMU 平台"
#. module: ccs_base #. module: ccs_base
#: model:ir.actions.act_window,name:ccs_base.action_history_tt_api_log #: model:ir.actions.act_window,name:ccs_base.action_history_tt_api_log
#: model:ir.ui.menu,name:ccs_base.menu_history_flight_tt_api_log #: model:ir.ui.menu,name:ccs_base.menu_history_flight_tt_api_log
...@@ -3448,11 +3541,23 @@ msgstr "同步" ...@@ -3448,11 +3541,23 @@ msgstr "同步"
msgid "TIKTOK推送日志" msgid "TIKTOK推送日志"
msgstr "" msgstr ""
#. module: ccs_base
#: model:ir.actions.act_window,name:ccs_base.action_cc_bl
#: model:ir.model.fields.selection,name:ccs_base.selection__cc_bl__bl_type__tk
#: model:ir.ui.menu,name:ccs_base.menu_cc_bl model_terms:ir.ui.view,arch_db:ccs_base.tree_cc_bl_view
msgid "TK Bill of Loading"
msgstr "TK提单"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_history_ship_package__tk_code #: model:ir.model.fields,field_description:ccs_base.field_cc_history_ship_package__tk_code
#: model:ir.model.fields,help:ccs_base.field_cc_history_ship_package__tk_code #: model:ir.model.fields,help:ccs_base.field_cc_history_ship_package__tk_code
msgid "TK Code" msgid "TK Code"
msgstr "" msgstr "TK代码"
#. module: ccs_base
#: model:ir.model.fields.selection,name:ccs_base.selection__res_partner__platform_type__tk
msgid "TK Platform"
msgstr "TK 平台"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_history_package_sync_log__process_code #: model:ir.model.fields,field_description:ccs_base.field_cc_history_package_sync_log__process_code
...@@ -3959,6 +4064,11 @@ msgstr "重量单位" ...@@ -3959,6 +4064,11 @@ msgstr "重量单位"
msgid "Whether to export in Big packages" msgid "Whether to export in Big packages"
msgstr "是否分大包导出" msgstr "是否分大包导出"
#. module: ccs_base
#: model:ir.model.fields,help:ccs_base.field_batch_get_pod_info_wizard__get_last_mile_pod
msgid "Whether to get last mile POD information"
msgstr ""
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,help:ccs_base.field_batch_get_pod_info_wizard__remove_specified_text #: model:ir.model.fields,help:ccs_base.field_batch_get_pod_info_wizard__remove_specified_text
msgid "Whether to remove specified text from PDF files" msgid "Whether to remove specified text from PDF files"
...@@ -3967,7 +4077,7 @@ msgstr "是否涂抹PDF中的指定文字" ...@@ -3967,7 +4077,7 @@ msgstr "是否涂抹PDF中的指定文字"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,help:ccs_base.field_batch_get_pod_info_wizard__skip_ocr_direct_ai #: model:ir.model.fields,help:ccs_base.field_batch_get_pod_info_wizard__skip_ocr_direct_ai
msgid "Whether to skip OCR processing and directly use AI processing (for testing AI)" msgid "Whether to skip OCR processing and directly use AI processing (for testing AI)"
msgstr "" msgstr "是否跳过OCR处理直接使用AI处理(用于测试AI)"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,help:ccs_base.field_batch_get_pod_info_wizard__sync_match_node #: model:ir.model.fields,help:ccs_base.field_batch_get_pod_info_wizard__sync_match_node
...@@ -4145,6 +4255,21 @@ msgstr "" ...@@ -4145,6 +4255,21 @@ msgstr ""
msgid "分组" msgid "分组"
msgstr "" msgstr ""
#. module: ccs_base
#: model:ir.model.fields.selection,name:ccs_base.selection__batch_get_pod_info_wizard__action_type__创建temu提单
msgid "创建temu提单"
msgstr ""
#. module: ccs_base
#: model:ir.model.fields,help:ccs_base.field_batch_get_pod_info_wizard__sync_successful_processed
msgid "勾选后显示同步尾程POD和同步匹配节点的字段以及确定按钮"
msgstr ""
#. module: ccs_base
#: model:ir.model.fields,help:ccs_base.field_batch_get_pod_info_wizard__generate_successful_processed
msgid "勾选后显示确定按钮"
msgstr ""
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_bl__is_history #: model:ir.model.fields,field_description:ccs_base.field_cc_bl__is_history
msgid "历史单据" msgid "历史单据"
...@@ -4238,6 +4363,11 @@ msgstr "" ...@@ -4238,6 +4363,11 @@ msgstr ""
msgid "是否同步" msgid "是否同步"
msgstr "" msgstr ""
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__sync_successful_processed
msgid "是否同步成功涂抹的提单"
msgstr ""
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_history_tt_api_log__success_bl #: model:ir.model.fields,field_description:ccs_base.field_history_tt_api_log__success_bl
#: model_terms:ir.ui.view,arch_db:ccs_base.search_history_tt_api_log_view #: model_terms:ir.ui.view,arch_db:ccs_base.search_history_tt_api_log_view
...@@ -4265,6 +4395,11 @@ msgstr "" ...@@ -4265,6 +4395,11 @@ msgstr ""
msgid "清理向导临时附件" msgid "清理向导临时附件"
msgstr "" msgstr ""
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__generate_successful_processed
msgid "生成成功涂抹的提单附件信息"
msgstr ""
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_history_tt_api_log__source #: model:ir.model.fields,field_description:ccs_base.field_history_tt_api_log__source
#: model_terms:ir.ui.view,arch_db:ccs_base.search_history_tt_api_log_view #: model_terms:ir.ui.view,arch_db:ccs_base.search_history_tt_api_log_view
...@@ -4282,6 +4417,11 @@ msgstr "" ...@@ -4282,6 +4417,11 @@ msgstr ""
msgid "自动获取尾程POD" msgid "自动获取尾程POD"
msgstr "" msgstr ""
#. module: ccs_base
#: model:ir.model.fields.selection,name:ccs_base.selection__batch_get_pod_info_wizard__action_type__获取尾程pod信息
msgid "获取尾程POD信息"
msgstr ""
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_history_tt_api_log__request_id #: model:ir.model.fields,field_description:ccs_base.field_history_tt_api_log__request_id
msgid "请求id" msgid "请求id"
......
# 导入odoo # 导入odoo
# 导入日志 # 导入日志
import json
import logging
from datetime import timedelta
import base64 import base64
import io import io
import json
import logging
import zipfile import zipfile
from datetime import timedelta
import pytz import pytz
from odoo import models, fields, api, _ from odoo import models, fields, api, _
...@@ -740,11 +740,14 @@ class CcBL(models.Model): ...@@ -740,11 +740,14 @@ class CcBL(models.Model):
'sync_match_node': True 'sync_match_node': True
}) })
wizard_obj.confirm() wizard_obj.confirm()
def _get_pod_files(self): def _get_pod_files(self):
fix_name = '尾程交接POD(待大包数量和箱号)' fix_name = '尾程交接POD(待大包数量和箱号)'
res = [] res = []
for bl in self: for bl in self:
files = self.env['cc.clearance.file'].sudo().search([('bl_id', '=', bl.id), ('file_name', '=', fix_name), ('file', '!=', False)]) files = self.env['cc.clearance.file'].sudo().search(
[('bl_id', '=', bl.id), ('file_name', '=', fix_name), ('file', '!=', False)])
files = files.filtered(lambda f: f.file not in (False, b'', ''))
if not files: if not files:
continue continue
total = len(files) total = len(files)
...@@ -765,7 +768,9 @@ class CcBL(models.Model): ...@@ -765,7 +768,9 @@ class CcBL(models.Model):
return {'type': 'ir.actions.act_window_close'} return {'type': 'ir.actions.act_window_close'}
if len(self) == 1 and len(files) == 1: if len(self) == 1 and len(files) == 1:
name, data_b64 = files[0] name, data_b64 = files[0]
att = self.env['ir.attachment'].sudo().create({'name': name, 'datas': data_b64, 'res_model': 'cc.bl', 'res_id': self.id, 'mimetype': 'application/pdf'}) att = self.env['ir.attachment'].sudo().create(
{'name': name, 'datas': data_b64, 'res_model': 'cc.bl', 'res_id': self.id,
'mimetype': 'application/pdf'})
url = f"/web/content/ir.attachment/{att.id}/datas/{att.name}?download=true" url = f"/web/content/ir.attachment/{att.id}/datas/{att.name}?download=true"
return {'type': 'ir.actions.act_url', 'url': url, 'target': 'self'} return {'type': 'ir.actions.act_url', 'url': url, 'target': 'self'}
buf = io.BytesIO() buf = io.BytesIO()
...@@ -773,13 +778,12 @@ class CcBL(models.Model): ...@@ -773,13 +778,12 @@ class CcBL(models.Model):
for name, data_b64 in files: for name, data_b64 in files:
zf.writestr(name, base64.b64decode(data_b64)) zf.writestr(name, base64.b64decode(data_b64))
datas = base64.b64encode(buf.getvalue()) datas = base64.b64encode(buf.getvalue())
att = self.env['ir.attachment'].sudo().create({'name': 'POD.zip', 'datas': datas, 'res_model': 'cc.bl', 'res_id': self[0].id, 'mimetype': 'application/zip'}) att = self.env['ir.attachment'].sudo().create(
{'name': 'POD.zip', 'datas': datas, 'res_model': 'cc.bl', 'res_id': self[0].id,
'mimetype': 'application/zip'})
url = f"/web/content/ir.attachment/{att.id}/datas/{att.name}?download=true" url = f"/web/content/ir.attachment/{att.id}/datas/{att.name}?download=true"
return {'type': 'ir.actions.act_url', 'url': url, 'target': 'self'} return {'type': 'ir.actions.act_url', 'url': url, 'target': 'self'}
def action_package_pod(self, ids):
return self.browse(ids).action_download_pod()
# 增加一个can_cancel的方法,用于检查提单当前是否可以取消,返回True表示可以取消, False表示不可以取消,同时返回取消的原因 # 增加一个can_cancel的方法,用于检查提单当前是否可以取消,返回True表示可以取消, False表示不可以取消,同时返回取消的原因
def check_cancel(self): def check_cancel(self):
if self.is_cancel: if self.is_cancel:
...@@ -1239,7 +1243,6 @@ class CcBL(models.Model): ...@@ -1239,7 +1243,6 @@ class CcBL(models.Model):
'target': 'new' 'target': 'new'
} }
def action_batch_download_pod(self): def action_batch_download_pod(self):
""" """
将选中的提单以提单号命名下载尾程交接POD文件,若文件有多个则以提单-1/-2进行命名下载,若选择多个提单,则将所有文件打包成zip,zip命名则以POD进行命名 将选中的提单以提单号命名下载尾程交接POD文件,若文件有多个则以提单-1/-2进行命名下载,若选择多个提单,则将所有文件打包成zip,zip命名则以POD进行命名
...@@ -1249,13 +1252,13 @@ class CcBL(models.Model): ...@@ -1249,13 +1252,13 @@ class CcBL(models.Model):
raise UserError(_('Please select at least one bill of loading.')) raise UserError(_('Please select at least one bill of loading.'))
# 检查是否有尾程交接POD文件 # 检查是否有尾程交接POD文件
fix_name = '尾程交接POD(待大包数量和箱号)' fix_name = '尾程交接POD(待大包数量和箱号)'
has_files = self.env['cc.clearance.file'].search_count([('bl_id', 'in', self.ids), ('file_name', '=', fix_name), ('file', '!=', False)]) has_files = self.env['cc.clearance.file'].search_count(
[('bl_id', 'in', self.ids), ('file_name', '=', fix_name), ('file', '!=', False)])
if not has_files: if not has_files:
raise UserError(_('Please configure the tail-end handover POD file of the bill of loading first.')) raise UserError(_('Please configure the tail-end handover POD file of the bill of loading first.'))
return self.action_download_pod() return self.action_download_pod()
# 增加一个清关进度的业务对象,继承自models.Model, 用于管理业务数据.业务数据包括提单号、清关节点(业务对象)、进度日期、进度描述、更新人 # 增加一个清关进度的业务对象,继承自models.Model, 用于管理业务数据.业务数据包括提单号、清关节点(业务对象)、进度日期、进度描述、更新人
class CcProgress(models.Model): class CcProgress(models.Model):
# 模型名称 # 模型名称
......
...@@ -113,29 +113,22 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -113,29 +113,22 @@ class BatchGetPodInfoWizard(models.TransientModel):
processed_files_data = fields.Text(string='已处理的文件数据', help='存储已处理的文件信息(JSON格式)') processed_files_data = fields.Text(string='已处理的文件数据', help='存储已处理的文件信息(JSON格式)')
def _get_bill_numbers(self, bl_objs): def _get_bill_numbers(self, bl_objs):
# if self.action_type == '获取尾程POD信息':
# bl_objs = self.get_order()
# bill_numbers = [self.env['common.common'].sudo().process_match_str(bl.bl_no) for bl in bl_objs]
# else:
# bill_numbers = [self.env['common.common'].sudo().process_match_str(bl_no) for bl_no in
# self.bl_numbers.splitlines()]
_logger.info(f"开始预览操作,提单数量: {len(bl_objs)}") _logger.info(f"开始预览操作,提单数量: {len(bl_objs)}")
# 调用接口获取提单pdf文件 # 调用接口获取提单pdf文件
pdf_file_arr = self._get_pdf_file_arr(bl_objs) pdf_file_arr = self._get_pdf_file_arr(bl_objs)
# 处理PDF文件,匹配提单对象 # 处理PDF文件,匹配提单对象
processed_files = self._match_bl_by_file_name(pdf_file_arr, bl_objs) processed_files = self._match_bl_by_file_name(pdf_file_arr, bl_objs)
# 把没有匹配到文件的进行提示 # 把没有匹配到文件的进行提示
error_bl = [] error_bl = []
matched_bl_ids = [f['bl'].id for f in processed_files if f.get('bl')] matched_bl_ids = [f['bl'].id for f in processed_files if f.get('bl')]
for bl in bl_objs: for bl in bl_objs:
if bl.id not in matched_bl_ids: if bl.id not in matched_bl_ids:
error_bl.append(bl.id) error_bl.append(bl)
if error_bl: if error_bl:
logging.info('%s个提单无法找到release note文件' % len(error_bl)) logging.info('%s个提单无法找到release note文件' % len(error_bl))
if not self._context.get('is_skip_raise_error'): if not self._context.get('is_skip_raise_error'):
self.show_error_message = _('%s bill of loading cannot find release note file') % ( self.show_error_message = _('%s bill of loading cannot find release note file') % (
', '.join(error_bl)) ', '.join([bl.bl_no for bl in error_bl]))
return processed_files return processed_files
def action_preview(self): def action_preview(self):
...@@ -143,6 +136,7 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -143,6 +136,7 @@ class BatchGetPodInfoWizard(models.TransientModel):
预览操作:获取PDF、处理涂抹、合并PDF并显示 预览操作:获取PDF、处理涂抹、合并PDF并显示
""" """
action_type = self.action_type action_type = self.action_type
self.show_error_message = False
try: try:
bl_objs = self.get_bl_objs() # 获取提单 bl_objs = self.get_bl_objs() # 获取提单
# 处理PDF文件,匹配提单对象 # 处理PDF文件,匹配提单对象
...@@ -237,7 +231,8 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -237,7 +231,8 @@ class BatchGetPodInfoWizard(models.TransientModel):
# 返回表单视图 # 返回表单视图
return { return {
'type': 'ir.actions.act_window', 'type': 'ir.actions.act_window',
'name': _('Batch Get POD Info'), 'name': _('Batch Get POD Info') if action_type == '获取尾程POD信息' else _(
'Create TEMU Bill of Loading'),
'res_model': 'batch.get.pod.info.wizard', 'res_model': 'batch.get.pod.info.wizard',
'view_mode': 'form', 'view_mode': 'form',
'res_id': self.id, 'res_id': self.id,
...@@ -258,47 +253,6 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -258,47 +253,6 @@ class BatchGetPodInfoWizard(models.TransientModel):
'context': {'active_id': self._context.get('active_id', [])} 'context': {'active_id': self._context.get('active_id', [])}
} }
def get_bl_objs(self):
if self.action_type == '获取尾程POD信息':
bl_objs = self.get_order()
else:
raw_lines = [i.strip() for i in self.bl_numbers.splitlines() if i.strip()]
normalized_list = [self.env['common.common'].sudo().process_match_str(i) for i in raw_lines]
norm_to_raw = {}
for raw, norm in zip(raw_lines, normalized_list):
if norm not in norm_to_raw:
norm_to_raw[norm] = raw
normalized = sorted(set(normalized_list))
exist_set = set()
if normalized:
self._cr.execute(
"select UPPER(REPLACE(REPLACE(REPLACE(bl_no,' ', ''), '-', ''), '/', '')) from cc_bl where UPPER(REPLACE(REPLACE(REPLACE(bl_no,' ', ''), '-', ''), '/', '')) in %s",
(tuple(normalized),))
exist_set.update([r[0] for r in self._cr.fetchall()])
self._cr.execute(
"select UPPER(REPLACE(REPLACE(REPLACE(transfer_bl_no,' ', ''), '-', ''), '/', '')) from cc_bl where transfer_bl_no is not null and UPPER(REPLACE(REPLACE(REPLACE(transfer_bl_no,' ', ''), '-', ''), '/', '')) in %s",
(tuple(normalized),))
exist_set.update([r[0] for r in self._cr.fetchall()])
non_exist_norm = [n for n in normalized if n not in exist_set]
create_vals = [{
'customer_id': self.partner_id.id,
'bl_type': 'temu',
'bl_no': norm_to_raw[n]
} for n in non_exist_norm]
new_bl = self.env['cc.bl'].create(create_vals) if create_vals else self.env['cc.bl']
ids = []
if normalized:
self._cr.execute(
"select id from cc_bl where UPPER(REPLACE(REPLACE(REPLACE(bl_no,' ', ''), '-', ''), '/', '')) in %s",
(tuple(normalized),))
ids += [r[0] for r in self._cr.fetchall()]
self._cr.execute(
"select id from cc_bl where transfer_bl_no is not null and UPPER(REPLACE(REPLACE(REPLACE(transfer_bl_no,' ', ''), '-', ''), '/', '')) in %s",
(tuple(normalized),))
ids += [r[0] for r in self._cr.fetchall()]
bl_objs = self.env['cc.bl'].browse(list(set(ids))) | new_bl
return bl_objs
def confirm(self): def confirm(self):
""" """
Confirm operation # 确认操作 Confirm operation # 确认操作
...@@ -425,17 +379,58 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -425,17 +379,58 @@ class BatchGetPodInfoWizard(models.TransientModel):
'context': {'default_show_error_message': self.show_error_message, 'context': {'default_show_error_message': self.show_error_message,
'active_id': bl_objs.ids if bl_objs else False} 'active_id': bl_objs.ids if bl_objs else False}
} }
if action_type == '创建TEMU提单': if action_type == '创建temu提单':
return { return {
'type': 'ir.actions.act_window', 'type': 'ir.actions.act_window',
'res_model': 'cc.bl', 'res_model': 'cc.bl',
'name': _('TEMU Bill of Loading'), 'name': _('TEMU Bill of Loading'),
'view_mode': 'list,form', 'view_mode': 'list,form',
'domian': [('bl_type', '=', 'temu')], 'domain': [('bl_type', '=', 'temu')],
'context': {'default_bl_type': 'temu'}, 'context': {'default_bl_type': 'temu'},
'target': 'new', 'target': 'current',
} }
def get_bl_objs(self):
if self.action_type == '获取尾程POD信息':
bl_objs = self.get_order()
else:
raw_lines = [i.strip() for i in self.bl_numbers.splitlines() if i.strip()]
normalized_list = [self.env['common.common'].sudo().process_match_str(i) for i in raw_lines]
norm_to_raw = {}
for raw, norm in zip(raw_lines, normalized_list):
if norm not in norm_to_raw:
norm_to_raw[norm] = raw
normalized = sorted(set(normalized_list))
exist_set = set()
if normalized:
self._cr.execute(
"select UPPER(REPLACE(REPLACE(REPLACE(bl_no,' ', ''), '-', ''), '/', '')) from cc_bl where UPPER(REPLACE(REPLACE(REPLACE(bl_no,' ', ''), '-', ''), '/', '')) in %s",
(tuple(normalized),))
exist_set.update([r[0] for r in self._cr.fetchall()])
self._cr.execute(
"select UPPER(REPLACE(REPLACE(REPLACE(transfer_bl_no,' ', ''), '-', ''), '/', '')) from cc_bl where transfer_bl_no is not null and UPPER(REPLACE(REPLACE(REPLACE(transfer_bl_no,' ', ''), '-', ''), '/', '')) in %s",
(tuple(normalized),))
exist_set.update([r[0] for r in self._cr.fetchall()])
non_exist_norm = [n for n in normalized if n not in exist_set]
create_vals = [{
'customer_id': self.partner_id.id,
'bl_type': 'temu',
'bl_no': norm_to_raw[n]
} for n in non_exist_norm]
new_bl = self.env['cc.bl'].create(create_vals) if create_vals else self.env['cc.bl']
ids = []
if normalized:
self._cr.execute(
"select id from cc_bl where UPPER(REPLACE(REPLACE(REPLACE(bl_no,' ', ''), '-', ''), '/', '')) in %s",
(tuple(normalized),))
ids += [r[0] for r in self._cr.fetchall()]
self._cr.execute(
"select id from cc_bl where transfer_bl_no is not null and UPPER(REPLACE(REPLACE(REPLACE(transfer_bl_no,' ', ''), '-', ''), '/', '')) in %s",
(tuple(normalized),))
ids += [r[0] for r in self._cr.fetchall()]
bl_objs = self.env['cc.bl'].browse(list(set(ids))) | new_bl
return bl_objs
def _validate_node_push_conditions(self, processed_files): def _validate_node_push_conditions(self, processed_files):
""" """
验证节点推送条件 验证节点推送条件
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论