提交 543edc4a authored 作者: 贺阳's avatar 贺阳

理货接口翻译

上级 1411272c
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import math import math
import re import re
from odoo import http, fields, exceptions from odoo import http, fields, exceptions,_
from odoo.http import request from odoo.http import request
import logging import logging
import json import json
...@@ -35,11 +35,11 @@ class OrderController(http.Controller): ...@@ -35,11 +35,11 @@ class OrderController(http.Controller):
res['state'] = 200 res['state'] = 200
else: else:
res['state'] = 202 res['state'] = 202
res['message'] = '登录名、密码不能为空' res['message'] = _('Login name and password cannot be empty') # 登录名、密码不能为空
except exceptions.AccessDenied as e: except exceptions.AccessDenied as e:
if e.args == exceptions.AccessDenied().args: if e.args == exceptions.AccessDenied().args:
res['message'] = "错误的登录名或密码" res['message'] = _("Wrong login/password") # 错误的登录名或密码
else: else:
res['message'] = e.args[0] res['message'] = e.args[0]
logging.info('api_cc_login error:%s' % res) logging.info('api_cc_login error:%s' % res)
...@@ -64,13 +64,13 @@ class OrderController(http.Controller): ...@@ -64,13 +64,13 @@ class OrderController(http.Controller):
res['state'] = 200 res['state'] = 200
else: else:
res['state'] = 404 res['state'] = 404
res['message'] = '提单不存在!' res['message'] = _('Bill of lading does not exist') # 提单不存在
else: else:
res['state'] = 202 res['state'] = 202
res['message'] = '提单号不能为空!' res['message'] = _('The bill of lading number cannot be empty') # 提单号不能为空
except Exception as e: except Exception as e:
logging.info('bl_info error:%s' % e) logging.info('bl_info error:%s' % e)
res['message'] = '系统解析错误!' res['message'] = _('System parsing error, the reason for the error is %s', e) # 系统解析错误,错误原因是
logging.info('res:%s' % res) logging.info('res:%s' % res)
return res return res
...@@ -113,17 +113,18 @@ class OrderController(http.Controller): ...@@ -113,17 +113,18 @@ class OrderController(http.Controller):
else: else:
error_no_arr.append(big_package_no) error_no_arr.append(big_package_no)
if len(error_no_arr) > 0: if len(error_no_arr) > 0:
res['message'] = '大包号[%s]不存在!' % ','.join(list(set(error_no_arr))) res['message'] = _('Big package number [%s] does not exist',
','.join(list(set(error_no_arr)))) # 大包号[%s]不存在
else: else:
res['state'] = 200 res['state'] = 200
# if len(tally_no_arr) > 0: # if len(tally_no_arr) > 0:
# res['message'] = '大包号[%s]已理货,无需重新理货!' % ','.join(list(set(tally_no_arr))) # res['message'] = '大包号[%s]已理货,无需重新理货!' % ','.join(list(set(tally_no_arr)))
else: else:
res['message'] = '提单[%s]不存在!' % bl_no res['message'] = _('Bill of lading does not exist') # 提单不存在
else: else:
res['message'] = '提单号和大包数据不能为空' res['message'] = _('The bill of lading number and package data cannot be empty') # 提单号和大包数据不能为空
except Exception as e: except Exception as e:
logging.info('update_big_package_tally_detail error:%s' % e) logging.info('update_big_package_tally_detail error:%s' % e)
res['message'] = '系统解析错误' res['message'] = _('System parsing error, the reason for the error is %s', e) # 系统解析错误,错误原因是
return res return res
...@@ -316,8 +316,9 @@ class TTApi(http.Controller): ...@@ -316,8 +316,9 @@ class TTApi(http.Controller):
ship_packages = request.env['cc.ship.package'].sudo().search( ship_packages = request.env['cc.ship.package'].sudo().search(
[('logistic_order_no', 'in', package_ids)]) [('logistic_order_no', 'in', package_ids)])
if ship_packages and len(ship_packages) > 0: if ship_packages and len(ship_packages) > 0:
ship_packages.write({'big_package_id': big_package.id, 'bl_id': big_package.bl_id.id}) ship_packages.write(
{'is_cancel': False, 'cancel_reason': False, 'big_package_id': big_package.id,
'bl_id': big_package.bl_id.id})
if len(package_ids) != len(ship_packages): if len(package_ids) != len(ship_packages):
# 找出ship_packages没有找到的package # 找出ship_packages没有找到的package
package_ids = set(package_ids) package_ids = set(package_ids)
......
...@@ -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: 2024-08-28 07:28+0000\n" "POT-Creation-Date: 2024-09-10 09:27+0000\n"
"PO-Revision-Date: 2024-08-28 15:30+0800\n" "PO-Revision-Date: 2024-09-10 17:28+0800\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: zh_CN\n" "Language: zh_CN\n"
...@@ -20,12 +20,12 @@ msgstr "" ...@@ -20,12 +20,12 @@ msgstr ""
#. module: ccs_connect_tiktok #. module: ccs_connect_tiktok
#: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.form_cc_bl_view_inherit #: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.form_cc_bl_view_inherit
msgid "<span class=\"o_stat_text\">Not Sync Ship Packages</span>" msgid "<span class=\"o_stat_text\">Not Sync Ship Packages</span>"
msgstr "<span class=\"o_stat_text\">待同步小包</span>" msgstr "<span class=\"o_stat_text\">小包</span>"
#. module: ccs_connect_tiktok #. module: ccs_connect_tiktok
#: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.form_cc_bl_view_inherit #: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.form_cc_bl_view_inherit
msgid "<span class=\"o_stat_text\">Ship Packages</span>" msgid "<span class=\"o_stat_text\">Ship Packages</span>"
msgstr "<span class=\"o_stat_text\">小包</span>" msgstr "Ship Package"
#. module: ccs_connect_tiktok #. module: ccs_connect_tiktok
#: model:ir.model.fields,field_description:ccs_connect_tiktok.field_cc_ship_package_sync_log__api_customer #: model:ir.model.fields,field_description:ccs_connect_tiktok.field_cc_ship_package_sync_log__api_customer
...@@ -55,11 +55,30 @@ msgstr "批量同步小包状态" ...@@ -55,11 +55,30 @@ msgstr "批量同步小包状态"
msgid "Batch Update the status of the small package" msgid "Batch Update the status of the small package"
msgstr "批量更新小包状态向导" msgstr "批量更新小包状态向导"
#. module: ccs_connect_tiktok
#: model:ir.model,name:ccs_connect_tiktok.model_cc_big_package
msgid "Big Package"
msgstr "大包"
#. module: ccs_connect_tiktok
#. odoo-python
#: code:addons/ccs_connect_tiktok/controllers/order_controller.py:0
#, python-format
msgid "Big package number [%s] does not exist"
msgstr "大包号 [%s] 不存在"
#. module: ccs_connect_tiktok #. module: ccs_connect_tiktok
#: model:ir.model,name:ccs_connect_tiktok.model_cc_bl #: model:ir.model,name:ccs_connect_tiktok.model_cc_bl
msgid "Bill of Loading" msgid "Bill of Loading"
msgstr "提单" msgstr "提单"
#. module: ccs_connect_tiktok
#. odoo-python
#: code:addons/ccs_connect_tiktok/controllers/order_controller.py:0
#, python-format
msgid "Bill of lading does not exist"
msgstr "提单不存在"
#. module: ccs_connect_tiktok #. module: ccs_connect_tiktok
#: model:ir.model,name:ccs_connect_tiktok.model_cc_node #: model:ir.model,name:ccs_connect_tiktok.model_cc_node
msgid "CC Node" msgid "CC Node"
...@@ -152,6 +171,13 @@ msgstr "" ...@@ -152,6 +171,13 @@ msgstr ""
msgid "Last Updated on" msgid "Last Updated on"
msgstr "" msgstr ""
#. module: ccs_connect_tiktok
#. odoo-python
#: code:addons/ccs_connect_tiktok/controllers/order_controller.py:0
#, python-format
msgid "Login name and password cannot be empty"
msgstr "登录名和密码不能为空"
#. module: ccs_connect_tiktok #. module: ccs_connect_tiktok
#: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.search_cc_ship_package_view_inherit #: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.search_cc_ship_package_view_inherit
msgid "Not Sync" msgid "Not Sync"
...@@ -193,6 +219,11 @@ msgstr "小包" ...@@ -193,6 +219,11 @@ msgstr "小包"
msgid "Skip Check" msgid "Skip Check"
msgstr "跳过检查" msgstr "跳过检查"
#. module: ccs_connect_tiktok
#: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.form_cc_bl_view_inherit
msgid "Sync CC Attachment"
msgstr "同步清关文件"
#. module: ccs_connect_tiktok #. module: ccs_connect_tiktok
#: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.form_cc_ship_package_view_inherit #: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.form_cc_ship_package_view_inherit
msgid "Sync Log" msgid "Sync Log"
...@@ -203,11 +234,6 @@ msgstr "同步日志" ...@@ -203,11 +234,6 @@ msgstr "同步日志"
msgid "Sync Logs" msgid "Sync Logs"
msgstr "同步日志" msgstr "同步日志"
#. module: ccs_connect_tiktok
#: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.form_cc_bl_view_inherit
msgid "Sync CC Attachment"
msgstr "同步清关文件"
#. module: ccs_connect_tiktok #. module: ccs_connect_tiktok
#: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.form_cc_bl_view_inherit #: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.form_cc_bl_view_inherit
msgid "Sync Package Status" msgid "Sync Package Status"
...@@ -221,6 +247,13 @@ msgstr "同步包裹状态" ...@@ -221,6 +247,13 @@ msgstr "同步包裹状态"
msgid "Sync Time" msgid "Sync Time"
msgstr "同步时间" msgstr "同步时间"
#. module: ccs_connect_tiktok
#. odoo-python
#: code:addons/ccs_connect_tiktok/controllers/order_controller.py:0
#, python-format
msgid "System parsing error, the reason for the error is %s"
msgstr "系统解析错误,错误原因是 %s"
#. module: ccs_connect_tiktok #. module: ccs_connect_tiktok
#: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.res_config_settings_view_form_tt #: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.res_config_settings_view_form_tt
msgid "TIKTOK接口配置" msgid "TIKTOK接口配置"
...@@ -248,6 +281,20 @@ msgstr "编码" ...@@ -248,6 +281,20 @@ msgstr "编码"
msgid "TK Process Code" msgid "TK Process Code"
msgstr "进度编码" msgstr "进度编码"
#. module: ccs_connect_tiktok
#. odoo-python
#: code:addons/ccs_connect_tiktok/controllers/order_controller.py:0
#, python-format
msgid "The bill of lading number and package data cannot be empty"
msgstr "提单号和大包数据不能为空"
#. module: ccs_connect_tiktok
#. odoo-python
#: code:addons/ccs_connect_tiktok/controllers/order_controller.py:0
#, python-format
msgid "The bill of lading number cannot be empty"
msgstr "提单号不能为空"
#. module: ccs_connect_tiktok #. module: ccs_connect_tiktok
#. odoo-python #. odoo-python
#: code:addons/ccs_connect_tiktok/wizard/batch_input_ship_package_statu_wizard.py:0 #: code:addons/ccs_connect_tiktok/wizard/batch_input_ship_package_statu_wizard.py:0
...@@ -274,6 +321,13 @@ msgstr "未同步" ...@@ -274,6 +321,13 @@ msgstr "未同步"
msgid "Unsync Package Count" msgid "Unsync Package Count"
msgstr "未同步包裹数" msgstr "未同步包裹数"
#. module: ccs_connect_tiktok
#. odoo-python
#: code:addons/ccs_connect_tiktok/controllers/order_controller.py:0
#, python-format
msgid "Wrong login/password"
msgstr "错误的登录/密码"
#. module: ccs_connect_tiktok #. module: ccs_connect_tiktok
#. odoo-python #. odoo-python
#: code:addons/ccs_connect_tiktok/wizard/batch_input_ship_package_statu_wizard.py:0 #: code:addons/ccs_connect_tiktok/wizard/batch_input_ship_package_statu_wizard.py:0
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论