Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hh_ccs
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
贺阳
hh_ccs
Commits
543edc4a
提交
543edc4a
authored
9月 10, 2024
作者:
贺阳
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
理货接口翻译
上级
1411272c
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
77 行增加
和
21 行删除
+77
-21
order_controller.py
ccs_connect_tiktok/controllers/order_controller.py
+11
-10
tt_controllers.py
ccs_connect_tiktok/controllers/tt_controllers.py
+3
-2
zh_CN.po
ccs_connect_tiktok/i18n/zh_CN.po
+63
-9
没有找到文件。
ccs_connect_tiktok/controllers/order_controller.py
浏览文件 @
543edc4a
...
...
@@ -2,7 +2,7 @@
import
math
import
re
from
odoo
import
http
,
fields
,
exceptions
from
odoo
import
http
,
fields
,
exceptions
,
_
from
odoo.http
import
request
import
logging
import
json
...
...
@@ -35,11 +35,11 @@ class OrderController(http.Controller):
res
[
'state'
]
=
200
else
:
res
[
'state'
]
=
202
res
[
'message'
]
=
'登录名、密码不能为空'
res
[
'message'
]
=
_
(
'Login name and password cannot be empty'
)
# 登录名、密码不能为空
except
exceptions
.
AccessDenied
as
e
:
if
e
.
args
==
exceptions
.
AccessDenied
()
.
args
:
res
[
'message'
]
=
"错误的登录名或密码"
res
[
'message'
]
=
_
(
"Wrong login/password"
)
# 错误的登录名或密码
else
:
res
[
'message'
]
=
e
.
args
[
0
]
logging
.
info
(
'api_cc_login error:
%
s'
%
res
)
...
...
@@ -64,13 +64,13 @@ class OrderController(http.Controller):
res
[
'state'
]
=
200
else
:
res
[
'state'
]
=
404
res
[
'message'
]
=
'提单不存在!'
res
[
'message'
]
=
_
(
'Bill of lading does not exist'
)
# 提单不存在
else
:
res
[
'state'
]
=
202
res
[
'message'
]
=
'提单号不能为空!'
res
[
'message'
]
=
_
(
'The bill of lading number cannot be empty'
)
# 提单号不能为空
except
Exception
as
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
)
return
res
...
...
@@ -113,17 +113,18 @@ class OrderController(http.Controller):
else
:
error_no_arr
.
append
(
big_package_no
)
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
:
res
[
'state'
]
=
200
# if len(tally_no_arr) > 0:
# res['message'] = '大包号[%s]已理货,无需重新理货!' % ','.join(list(set(tally_no_arr)))
else
:
res
[
'message'
]
=
'提单[
%
s]不存在!'
%
bl_no
res
[
'message'
]
=
_
(
'Bill of lading does not exist'
)
# 提单不存在
else
:
res
[
'message'
]
=
'提单号和大包数据不能为空'
res
[
'message'
]
=
_
(
'The bill of lading number and package data cannot be empty'
)
# 提单号和大包数据不能为空
except
Exception
as
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
ccs_connect_tiktok/controllers/tt_controllers.py
浏览文件 @
543edc4a
...
...
@@ -316,8 +316,9 @@ class TTApi(http.Controller):
ship_packages
=
request
.
env
[
'cc.ship.package'
]
.
sudo
()
.
search
(
[(
'logistic_order_no'
,
'in'
,
package_ids
)])
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
):
# 找出ship_packages没有找到的package
package_ids
=
set
(
package_ids
)
...
...
ccs_connect_tiktok/i18n/zh_CN.po
浏览文件 @
543edc4a
...
...
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-0
8-28 07:28
+0000\n"
"PO-Revision-Date: 2024-0
8-28 15:30
+0800\n"
"POT-Creation-Date: 2024-0
9-10 09:27
+0000\n"
"PO-Revision-Date: 2024-0
9-10 17:28
+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: zh_CN\n"
...
...
@@ -20,12 +20,12 @@ msgstr ""
#. module: ccs_connect_tiktok
#: 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>"
msgstr "<span class=\"o_stat_text\">
待同步
小包</span>"
msgstr "<span class=\"o_stat_text\">小包</span>"
#. module: ccs_connect_tiktok
#: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.form_cc_bl_view_inherit
msgid "<span class=\"o_stat_text\">Ship Packages</span>"
msgstr "
<span class=\"o_stat_text\">小包</span>
"
msgstr "
Ship Package
"
#. module: ccs_connect_tiktok
#: model:ir.model.fields,field_description:ccs_connect_tiktok.field_cc_ship_package_sync_log__api_customer
...
...
@@ -55,11 +55,30 @@ msgstr "批量同步小包状态"
msgid "Batch Update the status of the small package"
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
#: model:ir.model,name:ccs_connect_tiktok.model_cc_bl
msgid "Bill of Loading"
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
#: model:ir.model,name:ccs_connect_tiktok.model_cc_node
msgid "CC Node"
...
...
@@ -152,6 +171,13 @@ msgstr ""
msgid "Last Updated on"
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
#: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.search_cc_ship_package_view_inherit
msgid "Not Sync"
...
...
@@ -193,6 +219,11 @@ msgstr "小包"
msgid "Skip Check"
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
#: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.form_cc_ship_package_view_inherit
msgid "Sync Log"
...
...
@@ -203,11 +234,6 @@ msgstr "同步日志"
msgid "Sync Logs"
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
#: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.form_cc_bl_view_inherit
msgid "Sync Package Status"
...
...
@@ -221,6 +247,13 @@ msgstr "同步包裹状态"
msgid "Sync Time"
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
#: model_terms:ir.ui.view,arch_db:ccs_connect_tiktok.res_config_settings_view_form_tt
msgid "TIKTOK接口配置"
...
...
@@ -248,6 +281,20 @@ msgstr "编码"
msgid "TK Process Code"
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
#. odoo-python
#: code:addons/ccs_connect_tiktok/wizard/batch_input_ship_package_statu_wizard.py:0
...
...
@@ -274,6 +321,13 @@ msgstr "未同步"
msgid "Unsync Package Count"
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
#. odoo-python
#: code:addons/ccs_connect_tiktok/wizard/batch_input_ship_package_statu_wizard.py:0
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论