Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hh_ccs
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
贺阳
hh_ccs
Commits
3265143c
提交
3265143c
authored
12月 03, 2025
作者:
贺阳
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.现有菜单提单改为TK提单
新增菜单TEMU提单,与提单属于同一个业务对象,界面一致,权限皆一致 2.客户上新增类型,可选类型:TK平台/TEMU平台 3.在TEMU提单上新增功能批量创建提单 点击批量创建,弹出向导: 客户:默认TEMU平台客户,任一一个,可修改 获取尾程POD信息
☑
️(默认勾选) 提单号:可输入多个,一行一个
上级
fd679109
全部展开
显示空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
346 行增加
和
48 行删除
+346
-48
__manifest__.py
ccs_base/__manifest__.py
+3
-0
cc_bill_loading.py
ccs_base/models/cc_bill_loading.py
+22
-2
res_partner.py
ccs_base/models/res_partner.py
+5
-0
create_temu_bl.js
ccs_base/static/src/mixins/create_temu_bl.js
+26
-0
link_transfer_bl_no.js
ccs_base/static/src/mixins/link_transfer_bl_no.js
+8
-0
big_package_list_controller.js
ccs_base/static/src/views/big_package_list_controller.js
+6
-1
bl_list_controller.js
ccs_base/static/src/views/bl_list_controller.js
+40
-1
list.xml
ccs_base/static/src/views/list.xml
+5
-0
temu_bl_list_controller.js
ccs_base/static/src/views/temu_bl_list_controller.js
+53
-0
cc_bl_view.xml
ccs_base/views/cc_bl_view.xml
+0
-0
menu_view.xml
ccs_base/views/menu_view.xml
+5
-34
res_partner_view.xml
ccs_base/views/res_partner_view.xml
+59
-0
batch_get_pod_info_wizard.py
ccs_base/wizard/batch_get_pod_info_wizard.py
+41
-5
batch_get_pod_info_wizard_views.xml
ccs_base/wizard/batch_get_pod_info_wizard_views.xml
+70
-2
__manifest__.py
many2many_attachment_preview/__manifest__.py
+2
-2
__init__.py
many2many_attachment_preview/models/__init__.py
+1
-1
没有找到文件。
ccs_base/__manifest__.py
浏览文件 @
3265143c
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
'views/cc_history_ship_package_view.xml'
,
'views/cc_history_ship_package_view.xml'
,
'views/cc_history_package_sync_log_view.xml'
,
'views/cc_history_package_sync_log_view.xml'
,
'views/history_tt_api_log.xml'
,
'views/history_tt_api_log.xml'
,
'views/res_partner_view.xml'
,
'views/menu_view.xml'
,
'views/menu_view.xml'
,
# 'views/cc_customers_declaration_order_view.xml',
# 'views/cc_customers_declaration_order_view.xml',
'templates/login.xml'
,
'templates/login.xml'
,
...
@@ -62,8 +63,10 @@
...
@@ -62,8 +63,10 @@
'web.assets_backend'
:
[
'web.assets_backend'
:
[
'ccs_base/static/src/mixins/link_pallet.js'
,
'ccs_base/static/src/mixins/link_pallet.js'
,
'ccs_base/static/src/mixins/link_transfer_bl_no.js'
,
'ccs_base/static/src/mixins/link_transfer_bl_no.js'
,
# 'ccs_base/static/src/mixins/create_temu_bl.js',
'ccs_base/static/src/views/big_package_list_controller.js'
,
'ccs_base/static/src/views/big_package_list_controller.js'
,
'ccs_base/static/src/views/bl_list_controller.js'
,
'ccs_base/static/src/views/bl_list_controller.js'
,
# 'ccs_base/static/src/views/temu_bl_list_controller.js',
'ccs_base/static/src/views/list.xml'
,
'ccs_base/static/src/views/list.xml'
,
],
],
},
},
...
...
ccs_base/models/cc_bill_loading.py
浏览文件 @
3265143c
...
@@ -636,6 +636,10 @@ class CcBL(models.Model):
...
@@ -636,6 +636,10 @@ class CcBL(models.Model):
}
}
redis_conn
.
lpush
(
'history_data_list'
,
json
.
dumps
(
vals
))
redis_conn
.
lpush
(
'history_data_list'
,
json
.
dumps
(
vals
))
# 新增类型 TK提单/TEMU提单
bl_type
=
fields
.
Selection
([(
'tk'
,
'TK Bill of Loading'
),
(
'temu'
,
'TEMU Bill of Loading'
)],
string
=
'B/L Type'
,
default
=
'tk'
)
is_history
=
fields
.
Boolean
(
'历史单据'
,
default
=
False
)
is_history
=
fields
.
Boolean
(
'历史单据'
,
default
=
False
)
# 提单号
# 提单号
bl_no
=
fields
.
Char
(
string
=
'B/L No'
,
index
=
True
)
bl_no
=
fields
.
Char
(
string
=
'B/L No'
,
index
=
True
)
...
@@ -721,7 +725,8 @@ class CcBL(models.Model):
...
@@ -721,7 +725,8 @@ class CcBL(models.Model):
bl_objs
=
self
.
env
[
'cc.bl'
]
.
search
(
bl_objs
=
self
.
env
[
'cc.bl'
]
.
search
(
[(
'state'
,
'='
,
'ccing'
),
(
'cc_attachment_ids.file_name'
,
'='
,
fix_name
)])
[(
'state'
,
'='
,
'ccing'
),
(
'cc_attachment_ids.file_name'
,
'='
,
fix_name
)])
if
len
(
bl_objs
)
>
0
:
if
len
(
bl_objs
)
>
0
:
line_objs
=
bl_objs
.
cc_attachment_ids
.
filtered
(
lambda
attach
:
not
attach
.
file
and
attach
.
file_name
==
fix_name
)
line_objs
=
bl_objs
.
cc_attachment_ids
.
filtered
(
lambda
attach
:
not
attach
.
file
and
attach
.
file_name
==
fix_name
)
if
len
(
line_objs
)
>
0
:
if
len
(
line_objs
)
>
0
:
bl_objs
=
line_objs
.
mapped
(
'bl_id'
)
bl_objs
=
line_objs
.
mapped
(
'bl_id'
)
logging
.
info
(
'cron_get_pod bl_objs:
%
s,
%
s'
%
(
len
(
bl_objs
),
','
.
join
([
bl
.
bl_no
for
bl
in
bl_objs
])))
logging
.
info
(
'cron_get_pod bl_objs:
%
s,
%
s'
%
(
len
(
bl_objs
),
','
.
join
([
bl
.
bl_no
for
bl
in
bl_objs
])))
...
@@ -1173,10 +1178,25 @@ class CcBL(models.Model):
...
@@ -1173,10 +1178,25 @@ class CcBL(models.Model):
'type'
:
'ir.actions.act_window'
,
'type'
:
'ir.actions.act_window'
,
'view_mode'
:
'form'
,
'view_mode'
:
'form'
,
'res_model'
:
'batch.get.pod.info.wizard'
,
'res_model'
:
'batch.get.pod.info.wizard'
,
'context'
:
{
'active_id'
:
self
.
ids
},
'context'
:
{
'active_id'
:
self
.
ids
,
'default_action_type'
:
'获取尾程POD信息'
},
'view_id'
:
self
.
env
.
ref
(
'ccs_base.view_batch_get_pod_info_wizard_form'
)
.
id
,
'target'
:
'new'
,
'target'
:
'new'
,
}
}
def
action_create_temu_bl
(
self
):
"""
创建temu提单
"""
return
{
'name'
:
_
(
'Create TEMU Bill of Loading'
),
'type'
:
'ir.actions.act_window'
,
'view_mode'
:
'form'
,
'res_model'
:
'batch.get.pod.info.wizard'
,
'views'
:
[[
self
.
env
.
ref
(
'ccs_base.view_batch_create_and_get_pod_info_wizard_form'
)
.
id
,
"form"
]],
'context'
:
{
'active_id'
:
self
.
ids
,
'default_action_type'
:
'创建temu提单'
},
'target'
:
'new'
}
# 增加一个清关进度的业务对象,继承自models.Model, 用于管理业务数据.业务数据包括提单号、清关节点(业务对象)、进度日期、进度描述、更新人
# 增加一个清关进度的业务对象,继承自models.Model, 用于管理业务数据.业务数据包括提单号、清关节点(业务对象)、进度日期、进度描述、更新人
class
CcProgress
(
models
.
Model
):
class
CcProgress
(
models
.
Model
):
...
...
ccs_base/models/res_partner.py
浏览文件 @
3265143c
...
@@ -17,3 +17,8 @@ class ResPartner(models.Model):
...
@@ -17,3 +17,8 @@ class ResPartner(models.Model):
is_customer
=
fields
.
Boolean
(
string
=
'Is Customer'
,
default
=
False
)
is_customer
=
fields
.
Boolean
(
string
=
'Is Customer'
,
default
=
False
)
# 是否是清关公司
# 是否是清关公司
is_clearance_company
=
fields
.
Boolean
(
string
=
'Is Clearance Company'
,
default
=
False
)
is_clearance_company
=
fields
.
Boolean
(
string
=
'Is Clearance Company'
,
default
=
False
)
#新增类型:TK平台/TEMU平台。用英文表示
platform_type
=
fields
.
Selection
([
(
'tk'
,
'TK Platform'
),
(
'temu'
,
'TEMU Platform'
),
],
string
=
'Platform Type'
,
default
=
'tk'
)
ccs_base/static/src/mixins/create_temu_bl.js
0 → 100644
浏览文件 @
3265143c
/** @odoo-module */
import
{
useService
}
from
'@web/core/utils/hooks'
;
const
{
useRef
,
useEffect
,
useState
}
=
owl
;
export
const
TemuBlCreateMixin
=
{
setup
()
{
this
.
_super
();
this
.
actionService
=
useService
(
'action'
);
this
.
notification
=
useService
(
'notification'
);
this
.
orm
=
useService
(
'orm'
);
this
.
http
=
useService
(
'http'
);
this
.
fileInput
=
useRef
(
'fileInput'
);
this
.
root
=
useRef
(
"root"
);
},
async
onCreateTemuBlClick
()
{
// 点击按钮弹出创建temu提单的向导
const
records
=
this
.
model
.
root
.
selection
;
const
recordIds
=
records
.
map
((
a
)
=>
a
.
resId
);
const
action
=
await
this
.
orm
.
call
(
'cc.bl'
,
'action_create_temu_bl'
,
[
recordIds
]);
this
.
actionService
.
doAction
(
action
);
},
};
ccs_base/static/src/mixins/link_transfer_bl_no.js
浏览文件 @
3265143c
...
@@ -23,4 +23,12 @@ export const LinkTransferBlNo = {
...
@@ -23,4 +23,12 @@ export const LinkTransferBlNo = {
this
.
actionService
.
doAction
(
action
);
this
.
actionService
.
doAction
(
action
);
},
},
async
onCreateTemuBlClick
()
{
// 点击按钮弹出创建temu提单的向导
const
records
=
this
.
model
.
root
.
selection
;
const
recordIds
=
records
.
map
((
a
)
=>
a
.
resId
);
const
action
=
await
this
.
orm
.
call
(
'cc.bl'
,
'action_create_temu_bl'
,
[
recordIds
]);
this
.
actionService
.
doAction
(
action
);
},
};
};
ccs_base/static/src/views/big_package_list_controller.js
浏览文件 @
3265143c
...
@@ -13,7 +13,7 @@ const {onWillStart} = owl;
...
@@ -13,7 +13,7 @@ const {onWillStart} = owl;
export
class
BigPackageListController
extends
ListController
{
export
class
BigPackageListController
extends
ListController
{
setup
()
{
setup
()
{
super
.
setup
();
super
.
setup
();
console
.
log
(
'----------引用成功'
)
console
.
log
(
'----------
big_package_list_controller
引用成功'
)
this
.
orm
=
useService
(
'orm'
);
this
.
orm
=
useService
(
'orm'
);
this
.
actionService
=
useService
(
'action'
);
this
.
actionService
=
useService
(
'action'
);
this
.
rpc
=
useService
(
"rpc"
);
this
.
rpc
=
useService
(
"rpc"
);
...
@@ -26,12 +26,17 @@ export class BigPackageListController extends ListController {
...
@@ -26,12 +26,17 @@ export class BigPackageListController extends ListController {
});
});
}
}
displayLink
()
{
displayLink
()
{
console
.
log
(
'ccs flag:'
+
this
.
isBigPackage
&&
this
.
is_link
)
console
.
log
(
'ccs flag:'
+
this
.
isBigPackage
&&
this
.
is_link
)
// 是大包的对象以及有清关清理的权限才显示按钮
// 是大包的对象以及有清关清理的权限才显示按钮
return
this
.
isBigPackage
&&
this
.
is_link
;
return
this
.
isBigPackage
&&
this
.
is_link
;
}
}
displayCreateTemuBl
(){
return
false
;
}
displayTransferBlNo
()
{
displayTransferBlNo
()
{
// 大包页面永远不显示“关联转单号”按钮
// 大包页面永远不显示“关联转单号”按钮
return
false
;
return
false
;
...
...
ccs_base/static/src/views/bl_list_controller.js
浏览文件 @
3265143c
...
@@ -13,16 +13,49 @@ const {onWillStart} = owl;
...
@@ -13,16 +13,49 @@ const {onWillStart} = owl;
export
class
BlListController
extends
ListController
{
export
class
BlListController
extends
ListController
{
setup
()
{
setup
()
{
super
.
setup
();
super
.
setup
();
console
.
log
(
'----------引用成功'
)
console
.
log
(
'----------
bl_list_controller
引用成功'
)
this
.
orm
=
useService
(
'orm'
);
this
.
orm
=
useService
(
'orm'
);
this
.
actionService
=
useService
(
'action'
);
this
.
actionService
=
useService
(
'action'
);
this
.
rpc
=
useService
(
"rpc"
);
this
.
rpc
=
useService
(
"rpc"
);
this
.
user
=
useService
(
"user"
);
this
.
user
=
useService
(
"user"
);
this
.
isBl
=
this
.
model
.
rootParams
.
resModel
===
"cc.bl"
;
this
.
isBl
=
this
.
model
.
rootParams
.
resModel
===
"cc.bl"
;
this
.
isTemuBl
=
false
;
if
(
this
.
isBl
)
{
const
d
=
this
.
props
.
domain
;
// #输出d类型
console
.
log
(
'd类型:'
+
typeof
d
)
console
.
log
(
'd:'
+
d
)
const
containsTk
=
(
x
)
=>
{
if
(
x
===
'temu'
)
{
return
true
;
}
if
(
Array
.
isArray
(
x
))
{
for
(
const
el
of
x
)
{
if
(
containsTk
(
el
))
{
return
true
;
}
}
return
false
;
}
if
(
x
&&
typeof
x
===
'object'
)
{
for
(
const
k
in
x
)
{
if
(
containsTk
(
x
[
k
]))
{
return
true
;
}
}
return
false
;
}
return
false
;
};
this
.
isTemuBl
=
!!
containsTk
(
d
);
}
console
.
log
(
'ccs isBl:'
+
this
.
isBl
)
console
.
log
(
'ccs isBl:'
+
this
.
isBl
)
console
.
log
(
'ccs isTemuBl:'
+
this
.
isTemuBl
)
onWillStart
(
async
()
=>
{
onWillStart
(
async
()
=>
{
this
.
can_link_transfer_bl_no
=
await
this
.
user
.
hasGroup
(
"ccs_base.group_clearance_of_customs_user"
);
this
.
can_link_transfer_bl_no
=
await
this
.
user
.
hasGroup
(
"ccs_base.group_clearance_of_customs_user"
);
console
.
log
(
'ccs can_link_transfer_bl_no:'
+
this
.
can_link_transfer_bl_no
)
console
.
log
(
'ccs can_link_transfer_bl_no:'
+
this
.
can_link_transfer_bl_no
)
this
.
is_user
=
await
this
.
user
.
hasGroup
(
"ccs_base.group_clearance_of_customs_user"
);
console
.
log
(
'ccs is_user:'
+
this
.
is_user
)
});
});
}
}
...
@@ -31,6 +64,12 @@ export class BlListController extends ListController {
...
@@ -31,6 +64,12 @@ export class BlListController extends ListController {
return
false
;
return
false
;
}
}
displayCreateTemuBl
()
{
console
.
log
(
'ccs flag:'
+
this
.
isTemuBl
&&
this
.
is_user
)
// 是temu提单的对象以及有清关用户的权限才显示按钮
return
this
.
isTemuBl
&&
this
.
is_user
;
}
displayTransferBlNo
()
{
displayTransferBlNo
()
{
console
.
log
(
'ccs flag:'
+
this
.
isBl
&&
this
.
can_link_transfer_bl_no
)
console
.
log
(
'ccs flag:'
+
this
.
isBl
&&
this
.
can_link_transfer_bl_no
)
// 是提单的对象以及有清关用户的权限才显示按钮
// 是提单的对象以及有清关用户的权限才显示按钮
...
...
ccs_base/static/src/views/list.xml
浏览文件 @
3265143c
...
@@ -12,5 +12,10 @@
...
@@ -12,5 +12,10 @@
Link Transfer B/L No
Link Transfer B/L No
</button>
</button>
</xpath>
</xpath>
<xpath
expr=
"//button[hasclass('o_list_button_add')]"
position=
"after"
>
<button
t-if=
"displayCreateTemuBl()"
type=
"button"
class=
"d-none d-md-inline o_button_create_temu_bl btn btn-primary mx-1"
t-on-click.prevent=
"onCreateTemuBlClick"
>
Batch Create B/L
</button>
</xpath>
</t>
</t>
</templates>
</templates>
ccs_base/static/src/views/temu_bl_list_controller.js
0 → 100644
浏览文件 @
3265143c
/** @odoo-module */
import
{
TemuBlCreateMixin
}
from
'../mixins/create_temu_bl'
;
import
{
registry
}
from
'@web/core/registry'
;
import
{
patch
}
from
'@web/core/utils/patch'
;
import
{
useService
}
from
'@web/core/utils/hooks'
;
import
{
listView
}
from
"@web/views/list/list_view"
;
import
{
ListController
}
from
"@web/views/list/list_controller"
;
const
{
onWillStart
}
=
owl
;
export
class
TemuBlListController
extends
ListController
{
setup
()
{
super
.
setup
();
console
.
log
(
'----------temu_bl_list_controller引用成功'
)
this
.
orm
=
useService
(
'orm'
);
this
.
actionService
=
useService
(
'action'
);
this
.
rpc
=
useService
(
"rpc"
);
this
.
user
=
useService
(
"user"
);
this
.
isTemuBl
=
this
.
model
.
rootParams
.
resModel
===
"cc.bl"
;
console
.
log
(
'ccs isTemuBl:'
+
this
.
isTemuBl
)
onWillStart
(
async
()
=>
{
this
.
is_user
=
await
this
.
user
.
hasGroup
(
"ccs_base.group_clearance_of_customs_user"
);
console
.
log
(
'ccs is_user:'
+
this
.
is_user
)
});
}
displayCreateTemuBl
()
{
console
.
log
(
'ccs flag:'
+
this
.
isTemuBl
&&
this
.
is_user
)
// 是temu提单的对象以及有清关用户的权限才显示按钮
return
this
.
isTemuBl
&&
this
.
is_user
;
}
displayLink
()
{
return
false
;
}
displayTransferBlNo
()
{
// 大包页面永远不显示“关联转单号”按钮
return
false
;
}
}
patch
(
TemuBlListController
.
prototype
,
'temu_bl_list_controller_create'
,
TemuBlCreateMixin
);
registry
.
category
(
'views'
).
add
(
'cc_temu_bl_tree'
,
{
...
listView
,
buttonTemplate
:
'ccs_base.ListButtons'
,
Controller
:
TemuBlListController
});
\ No newline at end of file
ccs_base/views/cc_bl_view.xml
浏览文件 @
3265143c
差异被折叠。
点击展开。
ccs_base/views/menu_view.xml
浏览文件 @
3265143c
...
@@ -14,22 +14,6 @@
...
@@ -14,22 +14,6 @@
<field
name=
"web_icon"
>
ccs_base,static/description/icon5.png
</field>
<field
name=
"web_icon"
>
ccs_base,static/description/icon5.png
</field>
</record>
</record>
<!-- # 增加一个"客户"action, 仅显示为客户的partner,显示模式为树,表单-->
<record
model=
"ir.actions.act_window"
id=
"action_cc_partner"
>
<field
name=
"name"
>
Customers
</field>
<field
name=
"res_model"
>
res.partner
</field>
<field
name=
"view_mode"
>
tree,form
</field>
<field
name=
"domain"
>
[('is_customer', '=', True)]
</field>
<field
name=
"context"
>
{'default_is_customer': True}
</field>
<field
name=
"help"
type=
"html"
>
<p
class=
"o_view_nocontent_smiling_face"
>
[Customers] Not yet! Click the Create button in the top left corner and the sofa is yours!
</p>
<p>
</p>
</field>
</record>
<!-- # 增加一个"客户"菜单, 与action_cc_partner关联-->
<!-- # 增加一个"客户"菜单, 与action_cc_partner关联-->
<menuitem
sequence=
"10"
name=
"Customers"
id=
"menu_cc_partner"
action=
"action_cc_partner"
<menuitem
sequence=
"10"
name=
"Customers"
id=
"menu_cc_partner"
action=
"action_cc_partner"
parent=
"menu_ccs_base_main"
/>
parent=
"menu_ccs_base_main"
/>
...
@@ -47,23 +31,6 @@
...
@@ -47,23 +31,6 @@
<menuitem
parent=
"menu_ccs_base_main"
sequence=
"99"
name=
"CC Node"
id=
"menu_cc_node"
action=
"action_cc_node"
/>
<menuitem
parent=
"menu_ccs_base_main"
sequence=
"99"
name=
"CC Node"
id=
"menu_cc_node"
action=
"action_cc_node"
/>
<!-- # 增加一个"供应商"action, 仅显示为供应商的partner,显示模式为树,表单-->
<record
model=
"ir.actions.act_window"
id=
"action_cc_is_clearance_company"
>
<field
name=
"name"
>
Clearance Company
</field>
<field
name=
"res_model"
>
res.partner
</field>
<field
name=
"view_mode"
>
tree,form
</field>
<field
name=
"domain"
>
[('is_clearance_company', '=', True)]
</field>
<field
name=
"context"
>
{'default_is_clearance_company': True}
</field>
<field
name=
"help"
type=
"html"
>
<p
class=
"o_view_nocontent_smiling_face"
>
[Clearance Company] Not yet! Click the Create button in the top left corner and the sofa is yours!
</p>
<p>
</p>
</field>
</record>
<!-- # 增加一个"供应商"菜单, 与action_cc_supplier关联-->
<!-- # 增加一个"供应商"菜单, 与action_cc_supplier关联-->
<menuitem
sequence=
"20"
name=
"Clearance Company"
id=
"menu_cc_clearance_company"
<menuitem
sequence=
"20"
name=
"Clearance Company"
id=
"menu_cc_clearance_company"
action=
"action_cc_is_clearance_company"
action=
"action_cc_is_clearance_company"
...
@@ -86,7 +53,11 @@
...
@@ -86,7 +53,11 @@
action=
"action_history_tt_api_log"
action=
"action_history_tt_api_log"
groups=
"ccs_base.group_clearance_of_customs_user,ccs_base.group_clearance_of_customs_manager"
/>
groups=
"ccs_base.group_clearance_of_customs_user,ccs_base.group_clearance_of_customs_manager"
/>
<menuitem
parent=
""
sequence=
"10"
name=
"Bill of Loading"
id=
"menu_cc_bl"
action=
"action_cc_bl"
<menuitem
parent=
""
sequence=
"10"
name=
"TK Bill of Loading"
id=
"menu_cc_bl"
action=
"action_cc_bl"
groups=
"ccs_base.group_clearance_of_customs_user,ccs_base.group_clearance_of_customs_manager"
/>
<!-- TEMU提单 -->
<menuitem
parent=
""
sequence=
"11"
name=
"TEMU Bill of Loading"
id=
"menu_temu_cc_bl"
action=
"action_temu_bl"
groups=
"ccs_base.group_clearance_of_customs_user,ccs_base.group_clearance_of_customs_manager"
/>
groups=
"ccs_base.group_clearance_of_customs_user,ccs_base.group_clearance_of_customs_manager"
/>
<menuitem
parent=
""
sequence=
"13"
name=
"Big Package"
id=
"menu_cc_big_package"
action=
"action_cc_big_package"
<menuitem
parent=
""
sequence=
"13"
name=
"Big Package"
id=
"menu_cc_big_package"
action=
"action_cc_big_package"
...
...
ccs_base/views/res_partner_view.xml
0 → 100644
浏览文件 @
3265143c
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data>
<record
id=
"view_partner_form"
model=
"ir.ui.view"
>
<field
name=
"name"
>
view_partner_form
</field>
<field
name=
"model"
>
res.partner
</field>
<field
name=
"inherit_id"
ref=
"base.view_partner_form"
/>
<field
name=
"arch"
type=
"xml"
>
<xpath
expr=
"//field[@name='vat']"
position=
"after"
>
<field
name=
"platform_type"
/>
</xpath>
</field>
</record>
<record
id=
"view_partner_tree"
model=
"ir.ui.view"
>
<field
name=
"name"
>
view_partner_tree
</field>
<field
name=
"model"
>
res.partner
</field>
<field
name=
"inherit_id"
ref=
"base.view_partner_tree"
/>
<field
name=
"arch"
type=
"xml"
>
<xpath
expr=
"//field[@name='email']"
position=
"after"
>
<field
name=
"platform_type"
/>
</xpath>
</field>
</record>
<!-- # 增加一个"客户"action, 仅显示为客户的partner,显示模式为树,表单-->
<record
model=
"ir.actions.act_window"
id=
"action_cc_partner"
>
<field
name=
"name"
>
Customers
</field>
<field
name=
"res_model"
>
res.partner
</field>
<field
name=
"view_mode"
>
tree,form
</field>
<field
name=
"domain"
>
[('is_customer', '=', True)]
</field>
<field
name=
"context"
>
{'default_is_customer': True}
</field>
<field
name=
"help"
type=
"html"
>
<p
class=
"o_view_nocontent_smiling_face"
>
[Customers] Not yet! Click the Create button in the top left corner and the sofa is yours!
</p>
<p>
</p>
</field>
</record>
<!-- # 增加一个"供应商"action, 仅显示为供应商的partner,显示模式为树,表单-->
<record
model=
"ir.actions.act_window"
id=
"action_cc_is_clearance_company"
>
<field
name=
"name"
>
Clearance Company
</field>
<field
name=
"res_model"
>
res.partner
</field>
<field
name=
"view_mode"
>
tree,form
</field>
<field
name=
"domain"
>
[('is_clearance_company', '=', True)]
</field>
<field
name=
"context"
>
{'default_is_clearance_company': True}
</field>
<field
name=
"help"
type=
"html"
>
<p
class=
"o_view_nocontent_smiling_face"
>
[Clearance Company] Not yet! Click the Create button in the top left corner and the sofa is yours!
</p>
<p>
</p>
</field>
</record>
</data>
</odoo>
\ No newline at end of file
ccs_base/wizard/batch_get_pod_info_wizard.py
浏览文件 @
3265143c
...
@@ -31,6 +31,47 @@ class BatchGetPodInfoWizard(models.TransientModel):
...
@@ -31,6 +31,47 @@ class BatchGetPodInfoWizard(models.TransientModel):
order_id
=
[
self
.
_context
.
get
(
'active_id'
)]
order_id
=
[
self
.
_context
.
get
(
'active_id'
)]
return
self
.
env
[
'cc.bl'
]
.
browse
(
order_id
)
return
self
.
env
[
'cc.bl'
]
.
browse
(
order_id
)
def
get_temu_partner
(
self
):
"""
获取默认的TEMU平台客户
:return:
"""
partner_ids
=
self
.
env
[
'res.partner'
]
.
search
([(
'platform_type'
,
'='
,
'temu'
)])
if
partner_ids
:
return
partner_ids
[
0
]
return
False
action_type
=
fields
.
Selection
([
(
'获取尾程POD信息'
,
'获取尾程POD信息'
),
(
'创建temu提单'
,
'创建temu提单'
),
],
string
=
'Action Type'
,
default
=
'获取尾程POD信息'
)
#============temu提单 批量创建操作相关字段============
# 客户:默认TEMU平台客户,任一一个,可修改
partner_id
=
fields
.
Many2one
(
'res.partner'
,
string
=
'Customer'
,
#客户
default
=
lambda
self
:
self
.
get_temu_partner
(),
domain
=
"[('is_customer', '=', True), ('platform_type', '=', 'temu')]"
)
# 提单号:可输入多个,一行一个
bl_number
=
fields
.
Text
(
string
=
'BL Number'
,
#提单号
help
=
'Enter multiple BL numbers, one per line'
# 输入多个BL号,每行一个
)
# 获取尾程POD信息☑️(默认勾选)
get_last_mile_pod
=
fields
.
Boolean
(
string
=
'Get Last Mile POD'
,
# 获取尾程POD信息
default
=
True
,
help
=
'Whether to get last mile POD information'
# 是否获取尾程POD信息
)
generate_successful_processed
=
fields
.
Boolean
(
string
=
'生成成功涂抹的提单附件信息'
,
# 生成成功涂抹的提单附件信息
default
=
False
,
help
=
'勾选后显示确定按钮'
)
# ===========提单获取尾程pod操作相关字段============
sync_last_mile_pod
=
fields
.
Boolean
(
sync_last_mile_pod
=
fields
.
Boolean
(
string
=
'Sync Last Mile POD'
,
# 同步尾程POD
string
=
'Sync Last Mile POD'
,
# 同步尾程POD
default
=
False
,
default
=
False
,
...
@@ -62,11 +103,6 @@ class BatchGetPodInfoWizard(models.TransientModel):
...
@@ -62,11 +103,6 @@ class BatchGetPodInfoWizard(models.TransientModel):
help
=
'勾选后显示同步尾程POD和同步匹配节点的字段以及确定按钮'
# 勾选后显示同步尾程POD和同步匹配节点的字段以及确定按钮
help
=
'勾选后显示同步尾程POD和同步匹配节点的字段以及确定按钮'
# 勾选后显示同步尾程POD和同步匹配节点的字段以及确定按钮
)
)
# debug_mode = fields.Boolean(
# string='Debug Mode', # 调试模式
# default=False,
# help='Show red markers for deleted text positions' # 显示删除文字位置的红色标记
# )
show_error_message
=
fields
.
Text
(
show_error_message
=
fields
.
Text
(
string
=
'Show Error Message'
,
string
=
'Show Error Message'
,
help
=
'Show error message'
help
=
'Show error message'
...
...
ccs_base/wizard/batch_get_pod_info_wizard_views.xml
浏览文件 @
3265143c
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
<group>
<group>
<!-- attrs="{'invisible': [('pdf_file', '!=', False)]}" -->
<!-- attrs="{'invisible': [('pdf_file', '!=', False)]}" -->
<field
name=
"remove_specified_text"
readonly=
"1"
widget=
"boolean_toggle"
/>
<field
name=
"remove_specified_text"
readonly=
"1"
widget=
"boolean_toggle"
/>
<field
name=
"skip_ocr_direct_ai"
readonly=
"0"
widget=
"boolean_toggle"
<field
name=
"skip_ocr_direct_ai"
invisible=
"1"
widget=
"boolean_toggle"
/>
attrs=
"{'invisible': [('pdf_file', '!=', False)]}
"
/>
<field
name=
"action_type"
invisible=
"1
"
/>
</group>
</group>
<group
attrs=
"{'invisible': ['|', ('pdf_file', '=', False), ('show_error_message', '=', False)]}"
>
<group
attrs=
"{'invisible': ['|', ('pdf_file', '=', False), ('show_error_message', '=', False)]}"
>
<field
name=
"sync_successful_processed"
widget=
"boolean_toggle"
/>
<field
name=
"sync_successful_processed"
widget=
"boolean_toggle"
/>
...
@@ -71,6 +71,74 @@
...
@@ -71,6 +71,74 @@
</field>
</field>
</record>
</record>
<!-- Batch Create and Get POD Info Wizard Form View 批量创建并获取POD信息向导表单视图 -->
<record
id=
"view_batch_create_and_get_pod_info_wizard_form"
model=
"ir.ui.view"
>
<field
name=
"name"
>
batch.create.and.get.pod.info.wizard.form
</field>
<field
name=
"model"
>
batch.get.pod.info.wizard
</field>
<field
name=
"arch"
type=
"xml"
>
<form
string=
"Batch Create and Get POD Info"
>
<!-- 批量创建并获取POD信息 -->
<sheet>
<group>
<group>
<field
name=
"partner_id"
attrs=
"{'invisible': [('action_type', '!=', '创建temu提单')]}"
/>
<!-- 请输入提单号,可输入多个,一行一个 -->
<field
name=
"bl_number"
placeholder=
"Please enter the bill of lading numbers. Multiple entries are allowed, one per line"
attrs=
"{'invisible': [('action_type', '!=', '创建temu提单')]}"
/>
</group>
<group>
<field
name=
"get_last_mile_pod"
attrs=
"{'invisible': [('action_type', '!=', '创建temu提单')]}"
/>
<field
name=
"remove_specified_text"
readonly=
"1"
attrs=
"{'invisible': [('get_last_mile_pod', '=', False)]}"
widget=
"boolean_toggle"
/>
<field
name=
"skip_ocr_direct_ai"
invisible=
"1"
widget=
"boolean_toggle"
/>
<field
name=
"action_type"
invisible=
"1"
/>
</group>
</group>
<group
attrs=
"{'invisible': ['|', ('pdf_file', '=', False), ('show_error_message', '=', False)]}"
>
<field
name=
"generate_successful_processed"
widget=
"boolean_toggle"
/>
</group>
<div
class=
"alert alert-info"
role=
"alert"
>
<strong>
Description:
</strong>
<!-- 说明: -->
<ul>
<li>
<strong>
Get Last Mile POD:
</strong>
Generate a last mile POD (Proof of Delivery) attachment information, including
big package quantities and container numbers
</li>
<!-- 获取尾程POD:生成一条尾程交接POD(待大包数量和箱号)的附件信息 -->
<li
attrs=
"{'invisible': [('get_last_mile_pod', '=', False)]}"
>
<strong>
Remove Specified Text:
</strong>
Remove specified text (AGN, UCLINK LOGISITICS LTD) from PDF files
</li>
<!-- 涂抹指定文字:对PDF文件中的指定文字进行涂抹处理 -->
</ul>
</div>
<div
class=
"alert alert-danger"
role=
"alert"
attrs=
"{'invisible': [('show_error_message', '=', False)]}"
>
<field
name=
"show_error_message"
/>
</div>
<div>
<field
name=
"pdf_file"
filename=
"pdf_filename"
widget=
"pdf_viewer"
readonly=
"1"
attrs=
"{'invisible': [('pdf_file', '=', False)]}"
/>
</div>
<footer>
<!-- 预览按钮:处理PDF并显示合并后的文件 -->
<button
string=
"Preview"
type=
"object"
name=
"action_preview"
class=
"btn-primary"
attrs=
"{'invisible': ['|',('pdf_file', '!=', False),('get_last_mile_pod','=',False)]}"
/>
<!-- 确认按钮:使用已处理的文件数据进行回写 -->
<!-- 如果有失败的文件(show_error_message不为空),需要勾选generate_successful_processed才显示;如果全部成功,直接显示 -->
<button
string=
"Confirm"
type=
"object"
name=
"confirm"
class=
"btn-primary"
attrs=
"{'invisible': ['|', ('get_last_mile_pod','=',False),('|', ('pdf_file', '=', False), '&', ('show_error_message', '!=', False), ('generate_successful_processed', '=', False))]}"
/>
<button
string=
"Close"
special=
"cancel"
/>
</footer>
</sheet>
</form>
</field>
</record>
<!-- Batch Get POD Info Wizard Action 批量获取POD信息向导动作 -->
<!-- Batch Get POD Info Wizard Action 批量获取POD信息向导动作 -->
<record
id=
"action_batch_get_pod_info_wizard"
model=
"ir.actions.act_window"
>
<record
id=
"action_batch_get_pod_info_wizard"
model=
"ir.actions.act_window"
>
<field
name=
"name"
>
Batch Get POD Info
</field>
<!-- 批量获取POD信息 -->
<field
name=
"name"
>
Batch Get POD Info
</field>
<!-- 批量获取POD信息 -->
...
...
many2many_attachment_preview/__manifest__.py
浏览文件 @
3265143c
...
@@ -30,8 +30,8 @@
...
@@ -30,8 +30,8 @@
'company'
:
'Cybrosys Techno Solutions'
,
'company'
:
'Cybrosys Techno Solutions'
,
'maintainer'
:
'Cybrosys Techno Solutions'
,
'maintainer'
:
'Cybrosys Techno Solutions'
,
'website'
:
"http://www.cybrosys.com"
,
'website'
:
"http://www.cybrosys.com"
,
'depends'
:
[
'base'
,
'sale_management'
],
'depends'
:
[
'base'
],
'data'
:
[
'views/sale_order_views.xml'
],
'data'
:
[],
'assets'
:
{
'assets'
:
{
'web.assets_backend'
:
[
'web.assets_backend'
:
[
'many2many_attachment_preview/static/src/js/attachment_preview.js'
,
'many2many_attachment_preview/static/src/js/attachment_preview.js'
,
...
...
many2many_attachment_preview/models/__init__.py
浏览文件 @
3265143c
...
@@ -19,4 +19,4 @@
...
@@ -19,4 +19,4 @@
# If not, see <http://www.gnu.org/licenses/>.
# If not, see <http://www.gnu.org/licenses/>.
#
#
#############################################################################
#############################################################################
from
.
import
sale_order
#
from . import sale_order
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论