Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hh_ccs
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
贺阳
hh_ccs
Commits
c47d2b90
提交
c47d2b90
authored
9月 10, 2024
作者:
贺阳
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
已理货的状态 不修改
上级
4fd4bb31
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
36 行增加
和
38 行删除
+36
-38
__init__.py
ccs_base/models/__init__.py
+1
-0
common_common.py
ccs_base/models/common_common.py
+24
-0
ir.model.access.csv
ccs_base/security/ir.model.access.csv
+1
-1
tt_controllers.py
ccs_connect_tiktok/controllers/tt_controllers.py
+3
-3
__init__.py
ccs_connect_tiktok/models/__init__.py
+2
-0
cc_bill_loading.py
ccs_connect_tiktok/models/cc_bill_loading.py
+5
-2
common.py
ccs_connect_tiktok/models/common.py
+0
-32
没有找到文件。
ccs_base/models/__init__.py
浏览文件 @
c47d2b90
...
@@ -4,4 +4,5 @@ from . import cc_bill_loading
...
@@ -4,4 +4,5 @@ from . import cc_bill_loading
from
.
import
cc_customs_declaration_order
from
.
import
cc_customs_declaration_order
from
.
import
cc_node_exception_reason
from
.
import
cc_node_exception_reason
from
.
import
mail_thread
from
.
import
mail_thread
from
.
import
common_common
ccs_base/models/common_common.py
0 → 100644
浏览文件 @
c47d2b90
# -*- coding: utf-8 -*-
import
datetime
import
re
from
odoo
import
fields
,
models
,
exceptions
,
api
,
tools
import
logging
__author__
=
'zd'
_logger
=
logging
.
getLogger
(
__name__
)
class
CommonCommon
(
models
.
Model
):
_name
=
'common.common'
_description
=
u'公用基础类'
def
get_format_time
(
self
,
parse_time
):
"""
把时间加上8小时
:return:
"""
dt
=
datetime
.
datetime
.
strptime
(
parse_time
,
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
d
=
dt
+
datetime
.
timedelta
(
hours
=
8
)
nTime
=
d
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
return
nTime
ccs_base/security/ir.model.access.csv
浏览文件 @
c47d2b90
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
batch_input_ship_package_status_wizard_group_user,batch_input_ship_package_status_wizard_group_user,ccs_base.model_batch_input_ship_package_status_wizard,base.group_user,1,1,1,1
batch_input_ship_package_status_wizard_group_user,batch_input_ship_package_status_wizard_group_user,ccs_base.model_batch_input_ship_package_status_wizard,base.group_user,1,1,1,1
export_bl_big_package_xlsx_wizard_group_user,export_bl_big_package_xlsx_wizard_group_user,ccs_base.model_export_bl_big_package_xlsx_wizard,base.group_user,1,1,1,1
export_bl_big_package_xlsx_wizard_group_user,export_bl_big_package_xlsx_wizard_group_user,ccs_base.model_export_bl_big_package_xlsx_wizard,base.group_user,1,1,1,1
access_group_user_common_common,access_group_user_common_common,model_common_common,base.group_user,1,1,1,1
access_cc_node_base.group_user,cc_node base.group_user,ccs_base.model_cc_node,base.group_user,1,0,0,0
access_cc_node_base.group_user,cc_node base.group_user,ccs_base.model_cc_node,base.group_user,1,0,0,0
...
...
ccs_connect_tiktok/controllers/tt_controllers.py
浏览文件 @
c47d2b90
...
@@ -378,7 +378,8 @@ class TTApi(http.Controller):
...
@@ -378,7 +378,8 @@ class TTApi(http.Controller):
img_file_code
=
kws
.
get
(
'img_detail'
)
.
get
(
'img_file_code'
)
img_file_code
=
kws
.
get
(
'img_detail'
)
.
get
(
'img_file_code'
)
img_file_type
=
kws
.
get
(
'img_detail'
)
.
get
(
'img_file_type'
)
img_file_type
=
kws
.
get
(
'img_detail'
)
.
get
(
'img_file_type'
)
img_file_vals
=
dict
(
name
=
'
%
s.
%
s'
%
(
kws
.
get
(
'master_waybill_no'
),
img_file_type
),
file_name
=
'
%
s.
%
s'
%
(
kws
.
get
(
'master_waybill_no'
),
img_file_type
)
img_file_vals
=
dict
(
name
=
file_name
,
res_model
=
'cc.bl'
,
res_model
=
'cc.bl'
,
res_id
=
bl
.
id
,
res_id
=
bl
.
id
,
type
=
'binary'
,
type
=
'binary'
,
...
@@ -386,8 +387,7 @@ class TTApi(http.Controller):
...
@@ -386,8 +387,7 @@ class TTApi(http.Controller):
mimetype
=
'image/
%
s'
%
img_file_type
)
mimetype
=
'image/
%
s'
%
img_file_type
)
img_file
=
request
.
env
[
'ir.attachment'
]
.
sudo
()
.
create
(
img_file_vals
)
img_file
=
request
.
env
[
'ir.attachment'
]
.
sudo
()
.
create
(
img_file_vals
)
if
img_file
:
if
img_file
:
vals
[
'bl_attachment_ids'
]
=
[(
4
,
img_file
.
id
)]
vals
[
'bl_attachment_ids'
]
=
[(
6
,
0
,
img_file
.
ids
)]
bl
.
write
(
vals
)
bl
.
write
(
vals
)
else
:
else
:
res
[
'code'
]
=
1009
res
[
'code'
]
=
1009
...
...
ccs_connect_tiktok/models/__init__.py
浏览文件 @
c47d2b90
...
@@ -7,3 +7,5 @@ from . import ao_tt_api_log
...
@@ -7,3 +7,5 @@ from . import ao_tt_api_log
from
.
import
cc_node
from
.
import
cc_node
from
.
import
cc_bill_loading
from
.
import
cc_bill_loading
ccs_connect_tiktok/models/cc_bill_loading.py
浏览文件 @
c47d2b90
...
@@ -269,15 +269,18 @@ class CcBigPackage(models.Model):
...
@@ -269,15 +269,18 @@ class CcBigPackage(models.Model):
'tally_state'
:
state_arr
[
self
.
tally_state
]
or
''
,
# 理货状态
'tally_state'
:
state_arr
[
self
.
tally_state
]
or
''
,
# 理货状态
'tally_user_id'
:
self
.
tally_user_id
.
id
or
''
,
# 理货人id
'tally_user_id'
:
self
.
tally_user_id
.
id
or
''
,
# 理货人id
'tally_user_name'
:
self
.
tally_user_id
.
name
or
''
,
# 理货人名称
'tally_user_name'
:
self
.
tally_user_id
.
name
or
''
,
# 理货人名称
'tally_time'
:
self
.
tally_time
or
''
,
# 理货时间
'tally_time'
:
self
.
tally_time
or
''
,
# self.env['common.common'].sudo().get_format_time(str(self.tally_time)) if self.tally_time else '',
# 理货时间
'big_package_no'
:
self
.
big_package_no
or
''
# 大包号
'big_package_no'
:
self
.
big_package_no
or
''
# 大包号
}
}
return
vals
return
vals
def
update_big_package_info
(
self
,
**
kwargs
):
def
update_big_package_info
(
self
,
**
kwargs
):
"""
"""
修改信息
理货
"""
"""
if
self
.
tally_state
==
'unprocessed_goods'
:
if
kwargs
.
get
(
'tally_state'
):
if
kwargs
.
get
(
'tally_state'
):
state_arr
=
{
'未理货'
:
'unprocessed_goods'
,
'已理货'
:
'checked_goods'
}
state_arr
=
{
'未理货'
:
'unprocessed_goods'
,
'已理货'
:
'checked_goods'
}
self
.
tally_state
=
state_arr
[
kwargs
[
'tally_state'
]]
self
.
tally_state
=
state_arr
[
kwargs
[
'tally_state'
]]
...
...
ccs_connect_tiktok/models/common.py
deleted
100644 → 0
浏览文件 @
4fd4bb31
# -*- coding: utf-8 -*-
import
re
from
odoo
import
fields
,
models
,
exceptions
,
api
,
tools
import
logging
__author__
=
'zd'
_logger
=
logging
.
getLogger
(
__name__
)
class
AoCommon
(
models
.
Model
):
_inherit
=
'ao.common'
_description
=
u'公用基础类'
def
api_qy_wechat_notice
(
self
,
content
,
flight_id
):
"""
接口调用出错发送企业微信通知
:return:
"""
user_ids
=
[]
obj
=
self
.
env
[
'ao.api.warning.user'
]
.
sudo
()
.
search
(
[(
'air_line_ids'
,
'in'
,
flight_id
)],
limit
=
1
)
if
obj
:
for
user
in
obj
.
user_ids
:
user_ids
.
append
(
user
.
we_employee_id
)
lost_agent_id
=
self
.
env
[
'ir.config_parameter'
]
.
sudo
()
.
get_param
(
'lost_agent_id'
)
wechat
=
self
.
env
[
'we.config'
]
.
sudo
()
.
get_wechat
(
agent_id
=
lost_agent_id
)
wechat
.
message
.
send_markdown
(
agent_id
=
lost_agent_id
,
user_ids
=
user_ids
,
content
=
content
)
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论