提交 99e50e25 authored 作者: 贺阳's avatar 贺阳

同步和翻译

上级 81bac7cf
...@@ -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-10-17 04:50+0000\n" "POT-Creation-Date: 2025-10-17 07:22+0000\n"
"PO-Revision-Date: 2025-10-17 12:51+0800\n" "PO-Revision-Date: 2025-10-17 15:27+0800\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: zh_CN\n" "Language: zh_CN\n"
...@@ -58,6 +58,13 @@ msgid "" ...@@ -58,6 +58,13 @@ msgid ""
"is: %s, not sent %s email" "is: %s, not sent %s email"
msgstr "%s %s 操作了异常信息,异常原因:%s,未发送%s邮件" msgstr "%s %s 操作了异常信息,异常原因:%s,未发送%s邮件"
#. 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 find release note file"
msgstr "%s 提单无法找到release note文件"
#. 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 ""
...@@ -202,6 +209,28 @@ msgstr "" ...@@ -202,6 +209,28 @@ msgstr ""
"系统无法识别。\n" "系统无法识别。\n"
" </span>" " </span>"
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_get_pod_info_wizard_form
msgid "<strong>Description:</strong>"
msgstr "<strong>说明:</strong>"
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_get_pod_info_wizard_form
msgid ""
"<strong>Remove Specified Text:</strong> Remove specified text (AGN, UCLINK "
"LOGISITICS LTD) from PDF files"
msgstr ""
"<strong>删除指定文本:</strong>从 PDF 文件中删除指定文本(AGN、UCLINK "
"LOGISITICS LTD)。"
#. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_get_pod_info_wizard_form
msgid ""
"<strong>Sync Last Mile POD:</strong> Synchronize POD (Proof of Delivery) "
"attachment information with TK system, including big package quantities and "
"container numbers"
msgstr "同步尾程POD:向TK同步尾程交接POD(待大包数量和箱号)的附件信息"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,help:ccs_base.field_batch_input_ship_package_status_wizard__exclude_tracking_no #: model:ir.model.fields,help:ccs_base.field_batch_input_ship_package_status_wizard__exclude_tracking_no
#: model:ir.model.fields,help:ccs_base.field_batch_input_ship_package_status_wizard__select_tracking_no #: model:ir.model.fields,help:ccs_base.field_batch_input_ship_package_status_wizard__select_tracking_no
...@@ -228,6 +257,34 @@ msgstr "地址2" ...@@ -228,6 +257,34 @@ msgstr "地址2"
msgid "ADD 3" msgid "ADD 3"
msgstr "地址3" msgstr "地址3"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/wizard/batch_get_pod_info_wizard.py:0
#, python-format
msgid "API URL not configured"
msgstr "未配置 API URL"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/wizard/batch_get_pod_info_wizard.py:0
#, python-format
msgid "API request failed: %s"
msgstr "API 请求失败:%s"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/wizard/batch_get_pod_info_wizard.py:0
#, python-format
msgid "API returned empty response"
msgstr "API 返回空响应"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/wizard/batch_get_pod_info_wizard.py:0
#, python-format
msgid "API returned error: %s"
msgstr "API 返回错误:%s"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_last_mile_provider__abbreviation #: model:ir.model.fields,field_description:ccs_base.field_cc_last_mile_provider__abbreviation
msgid "Abbreviation" msgid "Abbreviation"
...@@ -435,6 +492,13 @@ msgstr "添加包裹异常信息" ...@@ -435,6 +492,13 @@ msgstr "添加包裹异常信息"
msgid "Add Package Exception Information Wizard" msgid "Add Package Exception Information Wizard"
msgstr "添加包裹异常信息向导" msgstr "添加包裹异常信息向导"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/wizard/batch_get_pod_info_wizard.py:0
#, python-format
msgid "All API PDF files failed validation"
msgstr "所有API PDF文件验证都失败"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_history_package_sync_log__api_customer #: model:ir.model.fields,field_description:ccs_base.field_cc_history_package_sync_log__api_customer
msgid "Api Customer" msgid "Api Customer"
...@@ -541,6 +605,21 @@ msgstr "批量添加异常信息" ...@@ -541,6 +605,21 @@ msgstr "批量添加异常信息"
msgid "Batch Complete" msgid "Batch Complete"
msgstr "批量完成" msgstr "批量完成"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/models/cc_bill_loading.py:0
#: model:ir.actions.act_window,name:ccs_base.action_batch_get_pod_info_wizard
#: model:ir.actions.server,name:ccs_base.bl_get_pod_info_server_action
#: model_terms:ir.ui.view,arch_db:ccs_base.view_batch_get_pod_info_wizard_form
#, python-format
msgid "Batch Get POD Info"
msgstr "批量获取尾程POD"
#. module: ccs_base
#: model:ir.model,name:ccs_base.model_batch_get_pod_info_wizard
msgid "Batch Get POD Info Wizard"
msgstr "批量获取尾程POD向导"
#. 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"
...@@ -945,6 +1024,7 @@ msgstr "清关文件" ...@@ -945,6 +1024,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_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
#: 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
...@@ -983,6 +1063,7 @@ msgstr "配置设置" ...@@ -983,6 +1063,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_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"
msgstr "确认" msgstr "确认"
...@@ -1030,6 +1111,7 @@ msgstr "快递名称" ...@@ -1030,6 +1111,7 @@ msgstr "快递名称"
#. 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
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__create_uid
#: model:ir.model.fields,field_description:ccs_base.field_batch_input_ship_package_status_wizard__create_uid #: model:ir.model.fields,field_description:ccs_base.field_batch_input_ship_package_status_wizard__create_uid
#: model:ir.model.fields,field_description:ccs_base.field_batch_update_transfer_bl_no_wizard__create_uid #: model:ir.model.fields,field_description:ccs_base.field_batch_update_transfer_bl_no_wizard__create_uid
#: model:ir.model.fields,field_description:ccs_base.field_bl_done_wizard__create_uid #: model:ir.model.fields,field_description:ccs_base.field_bl_done_wizard__create_uid
...@@ -1060,6 +1142,7 @@ msgstr "创建人" ...@@ -1060,6 +1142,7 @@ msgstr "创建人"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_add_exception_info_wizard__create_date #: model:ir.model.fields,field_description:ccs_base.field_add_exception_info_wizard__create_date
#: model:ir.model.fields,field_description:ccs_base.field_associate_pallet_wizard__create_date #: model:ir.model.fields,field_description:ccs_base.field_associate_pallet_wizard__create_date
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__create_date
#: model:ir.model.fields,field_description:ccs_base.field_batch_input_ship_package_status_wizard__create_date #: model:ir.model.fields,field_description:ccs_base.field_batch_input_ship_package_status_wizard__create_date
#: model:ir.model.fields,field_description:ccs_base.field_batch_update_transfer_bl_no_wizard__create_date #: model:ir.model.fields,field_description:ccs_base.field_batch_update_transfer_bl_no_wizard__create_date
#: model:ir.model.fields,field_description:ccs_base.field_bl_done_wizard__create_date #: model:ir.model.fields,field_description:ccs_base.field_bl_done_wizard__create_date
...@@ -1250,6 +1333,7 @@ msgstr "消费者地址" ...@@ -1250,6 +1333,7 @@ msgstr "消费者地址"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_add_exception_info_wizard__display_name #: model:ir.model.fields,field_description:ccs_base.field_add_exception_info_wizard__display_name
#: model:ir.model.fields,field_description:ccs_base.field_associate_pallet_wizard__display_name #: model:ir.model.fields,field_description:ccs_base.field_associate_pallet_wizard__display_name
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__display_name
#: model:ir.model.fields,field_description:ccs_base.field_batch_input_ship_package_status_wizard__display_name #: model:ir.model.fields,field_description:ccs_base.field_batch_input_ship_package_status_wizard__display_name
#: model:ir.model.fields,field_description:ccs_base.field_batch_update_transfer_bl_no_wizard__display_name #: model:ir.model.fields,field_description:ccs_base.field_batch_update_transfer_bl_no_wizard__display_name
#: model:ir.model.fields,field_description:ccs_base.field_bl_done_wizard__display_name #: model:ir.model.fields,field_description:ccs_base.field_bl_done_wizard__display_name
...@@ -1449,6 +1533,20 @@ msgstr "导出报关数据" ...@@ -1449,6 +1533,20 @@ msgstr "导出报关数据"
msgid "Export customs declaration documents" msgid "Export customs declaration documents"
msgstr "导出报关文件" msgstr "导出报关文件"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/wizard/batch_get_pod_info_wizard.py:0
#, python-format
msgid "Failed to get PDF file from API: %s"
msgstr "从 API 获取 PDF 文件失败: %s"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/wizard/batch_get_pod_info_wizard.py:0
#, python-format
msgid "Failed to save PDF attachment: %s"
msgstr "保存 PDF 附件失败:%s"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_clearance_file__file #: model:ir.model.fields,field_description:ccs_base.field_cc_clearance_file__file
#: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_clearance_file_view #: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_clearance_file_view
...@@ -1660,6 +1758,7 @@ msgstr "历史小包" ...@@ -1660,6 +1758,7 @@ msgstr "历史小包"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_add_exception_info_wizard__id #: model:ir.model.fields,field_description:ccs_base.field_add_exception_info_wizard__id
#: model:ir.model.fields,field_description:ccs_base.field_associate_pallet_wizard__id #: model:ir.model.fields,field_description:ccs_base.field_associate_pallet_wizard__id
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__id
#: model:ir.model.fields,field_description:ccs_base.field_batch_input_ship_package_status_wizard__id #: model:ir.model.fields,field_description:ccs_base.field_batch_input_ship_package_status_wizard__id
#: model:ir.model.fields,field_description:ccs_base.field_batch_update_transfer_bl_no_wizard__id #: model:ir.model.fields,field_description:ccs_base.field_batch_update_transfer_bl_no_wizard__id
#: model:ir.model.fields,field_description:ccs_base.field_bl_done_wizard__id #: model:ir.model.fields,field_description:ccs_base.field_bl_done_wizard__id
...@@ -1780,6 +1879,20 @@ msgstr "个人" ...@@ -1780,6 +1879,20 @@ msgstr "个人"
msgid "Internal Account Number" msgid "Internal Account Number"
msgstr "内部帐号" msgstr "内部帐号"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/wizard/batch_get_pod_info_wizard.py:0
#, python-format
msgid "Invalid PDF data for saving: cannot open PDF - %s"
msgstr "用于保存的 PDF 数据无效:无法打开 PDF - %s"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/wizard/batch_get_pod_info_wizard.py:0
#, python-format
msgid "Invalid PDF data for saving: not a valid PDF format"
msgstr "用于保存的 PDF 数据无效:不是有效的 PDF 格式"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_history_ship_package__invoice_attachment_ids #: model:ir.model.fields,field_description:ccs_base.field_cc_history_ship_package__invoice_attachment_ids
#: model:ir.model.fields,field_description:ccs_base.field_cc_ship_package__invoice_attachment_ids #: model:ir.model.fields,field_description:ccs_base.field_cc_ship_package__invoice_attachment_ids
...@@ -1978,13 +2091,17 @@ msgstr "尾程服务商" ...@@ -1978,13 +2091,17 @@ msgstr "尾程服务商"
#. module: ccs_base #. module: ccs_base
#: model:ir.actions.act_window,name:ccs_base.action_last_mile_provider #: model:ir.actions.act_window,name:ccs_base.action_last_mile_provider
#: model:ir.model.fields,field_description:ccs_base.field_cc_bl__last_mile_provider_ids
#: model:ir.ui.menu,name:ccs_base.menu_last_mile_provider #: model:ir.ui.menu,name:ccs_base.menu_last_mile_provider
#: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_bl_view
#: model_terms:ir.ui.view,arch_db:ccs_base.tree_cc_bl_view
msgid "Last Mile Providers" msgid "Last Mile Providers"
msgstr "尾程服务商" msgstr "尾程服务商"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_add_exception_info_wizard____last_update #: model:ir.model.fields,field_description:ccs_base.field_add_exception_info_wizard____last_update
#: model:ir.model.fields,field_description:ccs_base.field_associate_pallet_wizard____last_update #: model:ir.model.fields,field_description:ccs_base.field_associate_pallet_wizard____last_update
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard____last_update
#: model:ir.model.fields,field_description:ccs_base.field_batch_input_ship_package_status_wizard____last_update #: model:ir.model.fields,field_description:ccs_base.field_batch_input_ship_package_status_wizard____last_update
#: model:ir.model.fields,field_description:ccs_base.field_batch_update_transfer_bl_no_wizard____last_update #: model:ir.model.fields,field_description:ccs_base.field_batch_update_transfer_bl_no_wizard____last_update
#: model:ir.model.fields,field_description:ccs_base.field_bl_done_wizard____last_update #: model:ir.model.fields,field_description:ccs_base.field_bl_done_wizard____last_update
...@@ -2021,6 +2138,7 @@ msgstr "最近操作时间" ...@@ -2021,6 +2138,7 @@ msgstr "最近操作时间"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_add_exception_info_wizard__write_uid #: model:ir.model.fields,field_description:ccs_base.field_add_exception_info_wizard__write_uid
#: model:ir.model.fields,field_description:ccs_base.field_associate_pallet_wizard__write_uid #: model:ir.model.fields,field_description:ccs_base.field_associate_pallet_wizard__write_uid
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__write_uid
#: model:ir.model.fields,field_description:ccs_base.field_batch_input_ship_package_status_wizard__write_uid #: model:ir.model.fields,field_description:ccs_base.field_batch_input_ship_package_status_wizard__write_uid
#: model:ir.model.fields,field_description:ccs_base.field_batch_update_transfer_bl_no_wizard__write_uid #: model:ir.model.fields,field_description:ccs_base.field_batch_update_transfer_bl_no_wizard__write_uid
#: model:ir.model.fields,field_description:ccs_base.field_bl_done_wizard__write_uid #: model:ir.model.fields,field_description:ccs_base.field_bl_done_wizard__write_uid
...@@ -2051,6 +2169,7 @@ msgstr "最后更新人" ...@@ -2051,6 +2169,7 @@ msgstr "最后更新人"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_add_exception_info_wizard__write_date #: model:ir.model.fields,field_description:ccs_base.field_add_exception_info_wizard__write_date
#: model:ir.model.fields,field_description:ccs_base.field_associate_pallet_wizard__write_date #: model:ir.model.fields,field_description:ccs_base.field_associate_pallet_wizard__write_date
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__write_date
#: model:ir.model.fields,field_description:ccs_base.field_batch_input_ship_package_status_wizard__write_date #: model:ir.model.fields,field_description:ccs_base.field_batch_input_ship_package_status_wizard__write_date
#: model:ir.model.fields,field_description:ccs_base.field_batch_update_transfer_bl_no_wizard__write_date #: model:ir.model.fields,field_description:ccs_base.field_batch_update_transfer_bl_no_wizard__write_date
#: model:ir.model.fields,field_description:ccs_base.field_bl_done_wizard__write_date #: model:ir.model.fields,field_description:ccs_base.field_bl_done_wizard__write_date
...@@ -2314,6 +2433,20 @@ msgstr "下一阶段服务商名称" ...@@ -2314,6 +2433,20 @@ msgstr "下一阶段服务商名称"
msgid "No Bill of Loading" msgid "No Bill of Loading"
msgstr "提单号" msgstr "提单号"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/wizard/batch_get_pod_info_wizard.py:0
#, python-format
msgid "No PDF files found"
msgstr "无法获取到pdf文件"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/wizard/batch_get_pod_info_wizard.py:0
#, python-format
msgid "No PDF files found in API response"
msgstr "API调用成功,但没有PDF文件"
#. 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
...@@ -2321,6 +2454,13 @@ msgstr "提单号" ...@@ -2321,6 +2454,13 @@ msgstr "提单号"
msgid "No package to update found." msgid "No package to update found."
msgstr "未找到要更新的小包。" msgstr "未找到要更新的小包。"
#. module: ccs_base
#. odoo-python
#: code:addons/ccs_base/wizard/batch_get_pod_info_wizard.py:0
#, python-format
msgid "No processed file data available"
msgstr "没有处理后的文件数据"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_node_exception_reason__code_id #: model:ir.model.fields,field_description:ccs_base.field_cc_node_exception_reason__code_id
#: model_terms:ir.ui.view,arch_db:ccs_base.search_cc_node_exception_reason_view #: model_terms:ir.ui.view,arch_db:ccs_base.search_cc_node_exception_reason_view
...@@ -2903,6 +3043,11 @@ msgstr "收件人类型" ...@@ -2903,6 +3043,11 @@ msgstr "收件人类型"
msgid "Receiver VAT" msgid "Receiver VAT"
msgstr "收件人税号" msgstr "收件人税号"
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__remove_specified_text
msgid "Remove Specified Text"
msgstr "涂抹指定文字"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_cc_big_package__activity_user_id #: model:ir.model.fields,field_description:ccs_base.field_cc_big_package__activity_user_id
#: model:ir.model.fields,field_description:ccs_base.field_cc_bl__activity_user_id #: model:ir.model.fields,field_description:ccs_base.field_cc_bl__activity_user_id
...@@ -3270,6 +3415,11 @@ msgstr "" ...@@ -3270,6 +3415,11 @@ msgstr ""
msgid "Submit" msgid "Submit"
msgstr "提交" msgstr "提交"
#. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_batch_get_pod_info_wizard__sync_last_mile_pod
msgid "Sync Last Mile POD"
msgstr "同步尾程POD"
#. module: ccs_base #. module: ccs_base
#: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_history_ship_package_view #: model_terms:ir.ui.view,arch_db:ccs_base.form_cc_history_ship_package_view
msgid "Sync Log" msgid "Sync Log"
...@@ -3510,7 +3660,7 @@ msgstr "本周小包" ...@@ -3510,7 +3660,7 @@ msgstr "本周小包"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields,field_description:ccs_base.field_batch_input_ship_package_status_wizard__time_warning #: model:ir.model.fields,field_description:ccs_base.field_batch_input_ship_package_status_wizard__time_warning
msgid "Time Warning" msgid "Time Warning"
msgstr "" msgstr "时间预警"
#. module: ccs_base #. module: ccs_base
#: 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
...@@ -3811,6 +3961,16 @@ msgstr "重量单位" ...@@ -3811,6 +3961,16 @@ 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__remove_specified_text
msgid "Whether to remove specified text from PDF files"
msgstr "是否涂抹PDF中的指定文字"
#. module: ccs_base
#: model:ir.model.fields,help:ccs_base.field_batch_get_pod_info_wizard__sync_last_mile_pod
msgid "Whether to sync last mile POD information"
msgstr "是否同步尾程POD信息"
#. module: ccs_base #. module: ccs_base
#: model:ir.model.fields.selection,name:ccs_base.selection__export_bl_big_package_xlsx_wizard__select_type__yes #: model:ir.model.fields.selection,name:ccs_base.selection__export_bl_big_package_xlsx_wizard__select_type__yes
msgid "YES" msgid "YES"
......
...@@ -92,41 +92,35 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -92,41 +92,35 @@ class BatchGetPodInfoWizard(models.TransientModel):
try: try:
decoded_data = base64.b64decode(file_data) decoded_data = base64.b64decode(file_data)
if decoded_data.startswith(b'%PDF-'): if decoded_data.startswith(b'%PDF-'):
_logger.info(f"发现base64编码的PDF数据,提单号: {bl.bl_no}")
file_data = decoded_data file_data = decoded_data
else: else:
_logger.warning(f"base64解码后仍不是PDF格式,提单号: {bl.bl_no}")
continue continue
except Exception as e: except Exception as e:
_logger.warning(f"尝试base64解码失败,提单号: {bl.bl_no}, 错误: {str(e)}")
continue continue
elif isinstance(file_data, str): elif isinstance(file_data, str):
# 尝试base64解码 # 尝试base64解码
try: try:
decoded_data = base64.b64decode(file_data) decoded_data = base64.b64decode(file_data)
if decoded_data.startswith(b'%PDF-'): if decoded_data.startswith(b'%PDF-'):
_logger.info(f"字符串base64解码成功,是有效PDF,提单号: {bl.bl_no}")
file_data = decoded_data file_data = decoded_data
else: else:
_logger.warning(f"字符串base64解码后不是PDF格式,提单号: {bl.bl_no}")
continue continue
except Exception as e: except Exception as e:
_logger.warning(f"字符串base64解码失败,提单号: {bl.bl_no}, 错误: {str(e)}")
continue continue
else: else:
_logger.warning(f"清关文件数据格式不正确,类型: {type(file_data)},提单号: {bl.bl_no}")
continue continue
# 验证PDF可以打开 # # 验证PDF可以打开
try: # try:
import fitz # import fitz
test_doc = fitz.open(stream=file_data, filetype="pdf") # test_doc = fitz.open(stream=file_data, filetype="pdf")
page_count = len(test_doc) # page_count = len(test_doc)
test_doc.close() # test_doc.close()
_logger.info(f"清关文件PDF验证成功,页数: {page_count},提单号: {bl.bl_no}") # _logger.info(f"清关文件PDF验证成功,页数: {page_count},提单号: {bl.bl_no}")
except Exception as e: # except Exception as e:
_logger.warning(f"清关文件PDF无法打开,提单号: {bl.bl_no}, 错误: {str(e)}") # _logger.warning(f"清关文件PDF无法打开,提单号: {bl.bl_no}, 错误: {str(e)}")
continue # continue
# 转换为base64 # 转换为base64
file_data_base64 = base64.b64encode(file_data).decode('utf-8') file_data_base64 = base64.b64encode(file_data).decode('utf-8')
...@@ -136,15 +130,11 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -136,15 +130,11 @@ class BatchGetPodInfoWizard(models.TransientModel):
'file_name': clearance_file.attachment_name or clearance_file.file_name, 'file_name': clearance_file.attachment_name or clearance_file.file_name,
'file_data': file_data_base64 'file_data': file_data_base64
}) })
_logger.info(f"成功添加PDF文件,提单号: {bl.bl_no}, 文件名: {clearance_file.attachment_name or clearance_file.file_name}")
except Exception as e: except Exception as e:
_logger.error(f"处理清关文件失败,提单号: {bl.bl_no}, 错误: {str(e)}") _logger.error(f"处理清关文件失败,提单号: {bl.bl_no}, 错误: {str(e)}")
continue continue
else: else:
_logger.warning(f"未找到清关文件,提单号: {bl.bl_no}") _logger.warning(f"未找到清关文件,提单号: {bl.bl_no}")
_logger.info(f"从测试数据获取PDF文件,成功获取{len(pdf_file_arr)}个文件")
return pdf_file_arr return pdf_file_arr
# 写一个方法掉接口获取提单pdf文件 # 写一个方法掉接口获取提单pdf文件
...@@ -190,7 +180,7 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -190,7 +180,7 @@ class BatchGetPodInfoWizard(models.TransientModel):
results = result.get('results', []) results = result.get('results', [])
if not results: if not results:
_logger.warning("API调用成功,但没有PDF文件") _logger.warning("API调用成功,但没有PDF文件")
raise ValidationError(_('No PDF files found in API response')) raise ValidationError(_('No PDF files found in API response'))#提示:API调用成功,但没有PDF文件
# 构建PDF文件数组 # 构建PDF文件数组
pdf_file_arr = [] pdf_file_arr = []
for result_item in results: for result_item in results:
...@@ -237,7 +227,7 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -237,7 +227,7 @@ class BatchGetPodInfoWizard(models.TransientModel):
if not pdf_file_arr: if not pdf_file_arr:
_logger.error("所有API PDF文件验证都失败") _logger.error("所有API PDF文件验证都失败")
raise ValidationError(_('All API PDF files failed validation')) raise ValidationError(_('All API PDF files failed validation'))#提示:所有API PDF文件验证都失败
_logger.info(f"API调用成功,获取到{len(pdf_file_arr)}个有效PDF文件") _logger.info(f"API调用成功,获取到{len(pdf_file_arr)}个有效PDF文件")
return pdf_file_arr return pdf_file_arr
...@@ -280,6 +270,7 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -280,6 +270,7 @@ class BatchGetPodInfoWizard(models.TransientModel):
'attachment_name': file_name, 'attachment_name': file_name,
'file': file_data 'file': file_data
}) })
file_info['clearance_file'] = clearance_file
def _match_bl_by_file_name(self, pdf_file_arr): def _match_bl_by_file_name(self, pdf_file_arr):
""" """
...@@ -316,7 +307,7 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -316,7 +307,7 @@ class BatchGetPodInfoWizard(models.TransientModel):
""" """
# 回写PDF文件到清关文件 # 回写PDF文件到清关文件
self._write_pdf_file(processed_files) self._write_pdf_file(processed_files)
return False#测试 先不同步 # return False#测试 先不同步
# 同步尾程POD信息 # 同步尾程POD信息
for file_info in processed_files: for file_info in processed_files:
if not file_info['bl']: if not file_info['bl']:
...@@ -324,9 +315,8 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -324,9 +315,8 @@ class BatchGetPodInfoWizard(models.TransientModel):
bl = file_info['bl'] bl = file_info['bl']
# 查找清关文件并执行同步 # 查找清关文件并执行同步
clearance_files = self.env['cc.clearance.file'].sudo().search_clearance_file(bl.id, clearance_file = file_info.get('clearance_file')
'尾程交接POD(待大包数量和箱号)') if clearance_file:
for clearance_file in clearance_files:
clearance_file.action_sync() # 同步尾程POD clearance_file.action_sync() # 同步尾程POD
_logger.info(f"Successfully synced POD for BL {bl.bl_no}") _logger.info(f"Successfully synced POD for BL {bl.bl_no}")
...@@ -342,7 +332,6 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -342,7 +332,6 @@ class BatchGetPodInfoWizard(models.TransientModel):
if not file_info['bl']: if not file_info['bl']:
updated_files.append(file_info) updated_files.append(file_info)
continue continue
bl = file_info['bl'] bl = file_info['bl']
file_data = file_info['file_data'] file_data = file_info['file_data']
processed_file_data = file_data # 默认使用原始数据 processed_file_data = file_data # 默认使用原始数据
...@@ -353,28 +342,26 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -353,28 +342,26 @@ class BatchGetPodInfoWizard(models.TransientModel):
import base64 import base64
try: try:
pdf_binary = base64.b64decode(file_data) pdf_binary = base64.b64decode(file_data)
_logger.info(f"Base64解码成功,数据大小: {len(pdf_binary)}字节,提单号: {bl.bl_no}") # _logger.info(f"Base64解码成功,数据大小: {len(pdf_binary)}字节,提单号: {bl.bl_no}")
# 验证PDF文件头 # # 验证PDF文件头
if not pdf_binary.startswith(b'%PDF-'): # if not pdf_binary.startswith(b'%PDF-'):
_logger.error(f"解码后的数据不是有效的PDF文件,提单号: {bl.bl_no}") # _logger.error(f"解码后的数据不是有效的PDF文件,提单号: {bl.bl_no}")
_logger.error(f"文件头: {pdf_binary[:20]}") # _logger.error(f"文件头: {pdf_binary[:20]}")
raise ValidationError(_('Decoded data is not a valid PDF file for BL %s') % bl.bl_no) # raise ValidationError(_('Decoded data is not a valid PDF file for BL %s') % bl.bl_no)#提示:解码后的数据不是有效的PDF文件
# 验证PDF可以打开 # # 验证PDF可以打开
try: # try:
import fitz # import fitz
test_doc = fitz.open(stream=pdf_binary, filetype="pdf") # test_doc = fitz.open(stream=pdf_binary, filetype="pdf")
page_count = len(test_doc) # page_count = len(test_doc)
test_doc.close() # test_doc.close()
_logger.info(f"PDF验证成功,页数: {page_count},提单号: {bl.bl_no}") # _logger.info(f"PDF验证成功,页数: {page_count},提单号: {bl.bl_no}")
except Exception as e: # except Exception as e:
_logger.error(f"PDF文件无法打开,提单号: {bl.bl_no}, 错误: {str(e)}") # _logger.error(f"PDF文件无法打开,提单号: {bl.bl_no}, 错误: {str(e)}")
raise ValidationError(_('PDF file cannot be opened for BL %s: %s') % (bl.bl_no, str(e)))
except Exception as e: except Exception as e:
_logger.error(f"Base64解码失败,提单号: {bl.bl_no}, 错误: {str(e)}") _logger.error(f"Base64解码失败,提单号: {bl.bl_no}, 错误: {str(e)}")
raise ValidationError(_('Failed to decode base64 data for BL %s: %s') % (bl.bl_no, str(e)))
# 使用OCR方法处理PDF # 使用OCR方法处理PDF
processed_pdf = self._process_pdf_with_ocr( processed_pdf = self._process_pdf_with_ocr(
...@@ -419,14 +406,6 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -419,14 +406,6 @@ class BatchGetPodInfoWizard(models.TransientModel):
# 设置Tesseract路径 # 设置Tesseract路径
self._setup_tesseract_path() self._setup_tesseract_path()
# 验证PDF数据
if not pdf_data or not pdf_data.startswith(b'%PDF-'):
_logger.error(f"PDF数据无效,提单号: {bl_no}")
raise ValidationError(_('Invalid PDF data for BL %s') % bl_no)
_logger.info(f"开始OCR处理PDF,提单号: {bl_no}")
# 打开PDF文档 # 打开PDF文档
pdf_document = fitz.open(stream=pdf_data, filetype="pdf") pdf_document = fitz.open(stream=pdf_data, filetype="pdf")
total_rectangles = 0 total_rectangles = 0
...@@ -437,7 +416,7 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -437,7 +416,7 @@ class BatchGetPodInfoWizard(models.TransientModel):
# 处理每一页(完全按照HTML逻辑) # 处理每一页(完全按照HTML逻辑)
for page_num in range(len(pdf_document)): for page_num in range(len(pdf_document)):
page = pdf_document[page_num] page = pdf_document[page_num]
_logger.info(f"正在OCR识别第{page_num + 1}页") # _logger.info(f"正在OCR识别第{page_num + 1}页")
# 将页面转换为图像(与HTML完全一致) # 将页面转换为图像(与HTML完全一致)
mat = fitz.Matrix(2.0, 2.0) # 提高分辨率 mat = fitz.Matrix(2.0, 2.0) # 提高分辨率
...@@ -507,9 +486,6 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -507,9 +486,6 @@ class BatchGetPodInfoWizard(models.TransientModel):
) )
detected_texts.extend(page_texts) detected_texts.extend(page_texts)
_logger.info(f"第{page_num + 1}页OCR完成,找到{len(page_texts)}个目标文字")
# 根据OCR结果删除文字(完全按照HTML逻辑) # 根据OCR结果删除文字(完全按照HTML逻辑)
if page_texts: if page_texts:
...@@ -530,13 +506,10 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -530,13 +506,10 @@ class BatchGetPodInfoWizard(models.TransientModel):
color=(1, 1, 1), # 白色 color=(1, 1, 1), # 白色
fill=(1, 1, 1) # 填充白色 fill=(1, 1, 1) # 填充白色
) )
_logger.info(f"删除目标文字: {text_info['text']}") # _logger.info(f"删除目标文字: {text_info['text']}")
total_rectangles += 1 total_rectangles += 1
except Exception as e: except Exception as e:
_logger.error(f"删除失败: {str(e)}") _logger.error(f"删除失败: {str(e)}")
else:
_logger.warning(f"第{page_num + 1}页没有找到目标文字")
processed_pages += 1 processed_pages += 1
# 保存处理后的PDF # 保存处理后的PDF
...@@ -547,16 +520,9 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -547,16 +520,9 @@ class BatchGetPodInfoWizard(models.TransientModel):
result_data = output_buffer.getvalue() result_data = output_buffer.getvalue()
output_buffer.close() output_buffer.close()
_logger.info(f"PDF保存成功,数据大小: {len(result_data)}字节")
except Exception as e: except Exception as e:
_logger.error(f"PDF保存失败: {str(e)}") _logger.error(f"PDF保存失败: {str(e)}")
pdf_document.close() pdf_document.close()
raise ValidationError(_('Failed to save PDF: %s') % str(e))
_logger.info(f"PDF OCR处理完成,共处理{processed_pages}页,删除{total_rectangles}个文字区域,提单号: {bl_no}")
return result_data return result_data
...@@ -579,16 +545,12 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -579,16 +545,12 @@ class BatchGetPodInfoWizard(models.TransientModel):
for path in possible_paths: for path in possible_paths:
if os.path.exists(path): if os.path.exists(path):
pytesseract.pytesseract.tesseract_cmd = path pytesseract.pytesseract.tesseract_cmd = path
_logger.info(f"设置Tesseract路径: {path}")
break break
else:
_logger.warning("未找到Tesseract安装路径")
else: # Linux/Mac else: # Linux/Mac
# 检查Tesseract是否在PATH中 # 检查Tesseract是否在PATH中
tesseract_path = shutil.which('tesseract') tesseract_path = shutil.which('tesseract')
if tesseract_path: if tesseract_path:
pytesseract.pytesseract.tesseract_cmd = tesseract_path pytesseract.pytesseract.tesseract_cmd = tesseract_path
_logger.info(f"找到Tesseract路径: {tesseract_path}")
else: else:
# 尝试常见路径 # 尝试常见路径
possible_paths = [ possible_paths = [
...@@ -601,17 +563,11 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -601,17 +563,11 @@ class BatchGetPodInfoWizard(models.TransientModel):
for path in possible_paths: for path in possible_paths:
if os.path.exists(path): if os.path.exists(path):
pytesseract.pytesseract.tesseract_cmd = path pytesseract.pytesseract.tesseract_cmd = path
_logger.info(f"设置Tesseract路径: {path}")
break break
else:
_logger.warning("未找到Tesseract,请确保已安装tesseract-ocr")
# 检查语言数据文件 # 检查语言数据文件
self._check_tessdata_files() self._check_tessdata_files()
# except Exception as e:
# _logger.warning(f"设置Tesseract路径失败: {str(e)}")
def _check_tessdata_files(self): def _check_tessdata_files(self):
""" """
Check if tessdata files exist # 检查tessdata文件是否存在 Check if tessdata files exist # 检查tessdata文件是否存在
...@@ -640,11 +596,9 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -640,11 +596,9 @@ class BatchGetPodInfoWizard(models.TransientModel):
# 检查英语语言数据文件 # 检查英语语言数据文件
eng_data = os.path.join(tessdata_dir, 'eng.traineddata') eng_data = os.path.join(tessdata_dir, 'eng.traineddata')
if os.path.exists(eng_data): if os.path.exists(eng_data):
_logger.info(f"找到英语语言数据文件: {eng_data}") pass
else: else:
_logger.warning(f"未找到英语语言数据文件: {eng_data}") pass
_logger.warning("请安装英语语言包: sudo apt-get install tesseract-ocr-eng")
def _find_target_texts(self, words, page_num, viewport_width, viewport_height, page_width, page_height): def _find_target_texts(self, words, page_num, viewport_width, viewport_height, page_width, page_height):
""" """
...@@ -673,7 +627,7 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -673,7 +627,7 @@ class BatchGetPodInfoWizard(models.TransientModel):
is_excluded = True is_excluded = True
if is_excluded: if is_excluded:
_logger.info(f"排除文字: {word['text']}") # _logger.info(f"排除文字: {word['text']}")
continue continue
# 检查目标文字匹配(与HTML完全一致) # 检查目标文字匹配(与HTML完全一致)
...@@ -766,13 +720,9 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -766,13 +720,9 @@ class BatchGetPodInfoWizard(models.TransientModel):
return previous_row[-1] return previous_row[-1]
def _save_and_return_download_link(self, file_info): def _save_and_return_download_link(self, file_info):
""" """
Save processed PDF as attachment and return download action # 保存处理后的PDF作为附件并返回下载动作 用于测试的 Save processed PDF as attachment and return download action # 保存处理后的PDF作为附件并返回下载动作
:param file_info: 处理后的文件信息 :param file_info: 处理后的文件信息
:return: Odoo action to download the file :return: Odoo action to download the file
""" """
...@@ -784,23 +734,14 @@ class BatchGetPodInfoWizard(models.TransientModel): ...@@ -784,23 +734,14 @@ class BatchGetPodInfoWizard(models.TransientModel):
file_name = file_info.get('file_name', 'processed.pdf') file_name = file_info.get('file_name', 'processed.pdf')
if not file_data: if not file_data:
raise ValidationError(_('No processed file data available')) raise ValidationError(_('No processed file data available'))#提示:没有处理后的文件数据
# 解码base64数据 # 解码base64数据
if isinstance(file_data, str): if isinstance(file_data, str):
_logger.info(f"输入是字符串类型,长度: {len(file_data)}")
_logger.info(f"输入前50字符: {file_data[:50]}")
pdf_binary = base64.b64decode(file_data) pdf_binary = base64.b64decode(file_data)
else: else:
_logger.info(f"输入是bytes类型,长度: {len(file_data)}")
_logger.info(f"输入前20字节: {file_data[:20]}")
pdf_binary = file_data pdf_binary = file_data
# 验证PDF数据完整性
_logger.info(f"PDF二进制数据大小: {len(pdf_binary)}字节")
_logger.info(f"PDF文件头: {pdf_binary[:20]}")
_logger.info(f"PDF文件头(hex): {pdf_binary[:20].hex()}")
# 确保PDF数据有效 # 确保PDF数据有效
if not pdf_binary.startswith(b'%PDF-'): if not pdf_binary.startswith(b'%PDF-'):
_logger.error(f"保存的PDF数据不是有效的PDF格式,文件头: {pdf_binary[:20]}") _logger.error(f"保存的PDF数据不是有效的PDF格式,文件头: {pdf_binary[:20]}")
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div class="alert alert-info" role="alert"> <div class="alert alert-info" role="alert">
<strong>Description:</strong> <!-- 说明: --> <strong>Description:</strong> <!-- 说明: -->
<ul> <ul>
<li><strong>Sync Last Mile POD:</strong> Get the latest POD (Proof of Delivery) information from last mile service providers</li> <!-- 同步尾程POD:从尾程服务商获取最新的POD(Proof of Delivery)信息 --> <li><strong>Sync Last Mile POD:</strong> Synchronize POD (Proof of Delivery) attachment information with TK system, including big package quantities and container numbers</li> <!-- 同步尾程POD:向TK同步尾程交接POD(待大包数量和箱号)的附件信息 -->
<li><strong>Remove Specified Text:</strong> Remove specified text (AGN, UCLINK LOGISITICS LTD) from PDF files</li> <!-- 涂抹指定文字:对PDF文件中的指定文字进行涂抹处理 --> <li><strong>Remove Specified Text:</strong> Remove specified text (AGN, UCLINK LOGISITICS LTD) from PDF files</li> <!-- 涂抹指定文字:对PDF文件中的指定文字进行涂抹处理 -->
</ul> </ul>
</div> </div>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论