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 个修改的文件
包含
433 行增加
和
136 行删除
+433
-136
__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
+42
-4
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
+84
-84
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
+71
-3
__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"
);
...
@@ -25,12 +25,17 @@ export class BigPackageListController extends ListController {
...
@@ -25,12 +25,17 @@ export class BigPackageListController extends ListController {
console
.
log
(
'ccs is_link:'
+
this
.
is_link
)
console
.
log
(
'ccs is_link:'
+
this
.
is_link
)
});
});
}
}
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
()
{
// 大包页面永远不显示“关联转单号”按钮
// 大包页面永远不显示“关联转单号”按钮
...
...
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
)
});
});
}
}
...
@@ -30,7 +63,13 @@ export class BlListController extends ListController {
...
@@ -30,7 +63,13 @@ 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
)
// 是提单的对象以及有清关用户的权限才显示按钮
// 是提单的对象以及有清关用户的权限才显示按钮
...
@@ -45,4 +84,4 @@ registry.category('views').add('cc_bl_tree', {
...
@@ -45,4 +84,4 @@ registry.category('views').add('cc_bl_tree', {
...
listView
,
...
listView
,
buttonTemplate
:
'ccs_base.ListButtons'
,
buttonTemplate
:
'ccs_base.ListButtons'
,
Controller
:
BlListController
Controller
:
BlListController
});
});
\ No newline at end of file
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
...
@@ -7,13 +7,14 @@
...
@@ -7,13 +7,14 @@
<field
name=
"name"
>
tree.cc.bl
</field>
<field
name=
"name"
>
tree.cc.bl
</field>
<field
name=
"model"
>
cc.bl
</field>
<field
name=
"model"
>
cc.bl
</field>
<field
name=
"arch"
type=
"xml"
>
<field
name=
"arch"
type=
"xml"
>
<tree
string=
"Bill of Loading"
decoration-warning=
"is_cancel==True"
js_class=
"cc_bl_tree"
>
<tree
string=
"
TK
Bill of Loading"
decoration-warning=
"is_cancel==True"
js_class=
"cc_bl_tree"
>
<field
optional=
"show"
name=
"state"
string=
"Status"
widget=
"badge"
decoration-info=
"state=='draft'"
<field
optional=
"show"
name=
"state"
string=
"Status"
widget=
"badge"
decoration-info=
"state=='draft'"
decoration-primary=
"state=='ccing'"
decoration-success=
"state=='done'"
/>
decoration-primary=
"state=='ccing'"
decoration-success=
"state=='done'"
/>
<field
optional=
"show"
name=
"customs_clearance_status"
string=
"Customs Clearance Status"
/>
<field
optional=
"show"
name=
"customs_clearance_status"
string=
"Customs Clearance Status"
/>
<field
optional=
"show"
name=
"bl_no"
string=
"Bill of Loading No."
/>
<field
optional=
"show"
name=
"bl_no"
string=
"Bill of Loading No."
/>
<field
optional=
"show"
name=
"bl_date"
string=
"B/L Date"
/>
<field
optional=
"show"
name=
"bl_date"
string=
"B/L Date"
/>
<field
optional=
"show"
name=
"last_mile_provider_ids"
string=
"Last Mile Providers"
widget=
"many2many_tags"
/>
<field
optional=
"show"
name=
"last_mile_provider_ids"
string=
"Last Mile Providers"
widget=
"many2many_tags"
/>
<field
optional=
"hide"
name=
"transfer_bl_no"
string=
"Transfer Bill of Loading No."
/>
<field
optional=
"hide"
name=
"transfer_bl_no"
string=
"Transfer Bill of Loading No."
/>
<field
optional=
"show"
name=
"customer_id"
string=
"Customer"
/>
<field
optional=
"show"
name=
"customer_id"
string=
"Customer"
/>
<field
optional=
"show"
name=
"customs_bl_no"
string=
"Customs Bill of Loading No."
/>
<field
optional=
"show"
name=
"customs_bl_no"
string=
"Customs Bill of Loading No."
/>
...
@@ -60,16 +61,17 @@
...
@@ -60,16 +61,17 @@
string=
"Update Bill Of Loading Status"
string=
"Update Bill Of Loading Status"
context=
"{'active_id': id,'default_bl_id': active_id,
context=
"{'active_id': id,'default_bl_id': active_id,
'default_last_process_time':process_time,'default_current_status':customs_clearance_status}"
/>
'default_last_process_time':process_time,'default_current_status':customs_clearance_status}"
/>
<!-- 完成按钮 - 仅在清关中状态显示,仅清关员和清关经理可操作 -->
<!-- 完成按钮 - 仅在清关中状态显示,仅清关员和清关经理可操作 -->
<button
name=
"action_done"
type=
"object"
class=
"oe_highlight"
<button
name=
"action_done"
type=
"object"
class=
"oe_highlight"
string=
"Complete"
attrs=
"{'invisible': [('state', '!=', 'ccing')]}"
string=
"Complete"
attrs=
"{'invisible': [('state', '!=', 'ccing')]}"
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"
/>
<!-- 追回按钮 - 仅在已完成状态显示,仅清关员和清关经理可操作 -->
<!-- 追回按钮 - 仅在已完成状态显示,仅清关员和清关经理可操作 -->
<button
name=
"action_recall"
type=
"object"
string=
"Recall"
attrs=
"{'invisible': [('state', '!=', 'done')]}"
<button
name=
"action_recall"
type=
"object"
string=
"Recall"
attrs=
"{'invisible': [('state', '!=', 'done')]}"
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"
/>
<field
name=
"state"
widget=
"statusbar"
/>
<field
name=
"state"
widget=
"statusbar"
/>
<!-- options="{'clickable': '1'}" -->
<!-- options="{'clickable': '1'}" -->
...
@@ -156,6 +158,7 @@
...
@@ -156,6 +158,7 @@
<field
name=
"end_port_code"
string=
"End Port"
/>
<field
name=
"end_port_code"
string=
"End Port"
/>
<field
name=
"etd"
string=
"ETD"
/>
<field
name=
"etd"
string=
"ETD"
/>
<field
name=
"process_time"
string=
"Customs Clearance Status Process Time"
/>
<field
name=
"process_time"
string=
"Customs Clearance Status Process Time"
/>
<field
name=
"bl_type"
string=
"B/L Type"
invisible=
"1"
/>
</group>
</group>
<group>
<group>
<field
name=
"billing_weight"
string=
"Billing Weight"
/>
<field
name=
"billing_weight"
string=
"Billing Weight"
/>
...
@@ -170,23 +173,13 @@
...
@@ -170,23 +173,13 @@
domain=
"[('is_clearance_company', '=', True)]"
/>
domain=
"[('is_clearance_company', '=', True)]"
/>
<field
name=
"cc_country_id"
string=
"CC Country"
requied=
"1"
/>
<field
name=
"cc_country_id"
string=
"CC Country"
requied=
"1"
/>
<field
name=
"cc_deadline"
string=
"CC Deadline"
/>
<field
name=
"cc_deadline"
string=
"CC Deadline"
/>
<!-- <field name="cc_progress_date" string="Current CC Progress Date"/>-->
<!-- <field name="cc_progress" string="Current CC Progress"/>-->
</group>
</group>
</group>
</group>
<notebook>
<notebook>
<!-- <page string="CC Progress">-->
<!-- <field name="cc_progress_ids" string="CC Progress"/>-->
<!-- </page>-->
<!-- <page string="Ship Packages">-->
<!-- <field name="ship_package_ids" string="Ship Packages"/>-->
<!-- </page>-->
<!-- <page string="Big Packages">-->
<!-- <field name="big_package_ids" string="Big Packages"/>-->
<!-- </page>-->
<page
string=
"Attachments"
>
<page
string=
"Attachments"
>
<group>
<group>
<field
name=
"bl_attachment_ids"
string=
"B/L Attachments"
widget=
"many2many_attachment_preview"
<field
name=
"bl_attachment_ids"
string=
"B/L Attachments"
widget=
"many2many_attachment_preview"
readonly=
"1"
/>
readonly=
"1"
/>
<field
name=
"cc_attachment_ids"
string=
"CC Attachments"
/>
<field
name=
"cc_attachment_ids"
string=
"CC Attachments"
/>
</group>
</group>
...
@@ -332,82 +325,73 @@
...
@@ -332,82 +325,73 @@
</record>
</record>
<record
model=
"ir.actions.act_window"
id=
"action_cc_bl"
>
<record
model=
"ir.actions.act_window"
id=
"action_cc_bl"
>
<field
name=
"name"
>
Bill of Loading
</field>
<field
name=
"name"
>
TK
Bill of Loading
</field>
<field
name=
"res_model"
>
cc.bl
</field>
<field
name=
"res_model"
>
cc.bl
</field>
<field
name=
"view_mode"
>
tree,form,pivot,graph,calendar
</field>
<field
name=
"view_mode"
>
tree,form,pivot,graph,calendar
</field>
<field
name=
"domain"
>
[]
</field>
<field
name=
"domain"
>
[
('bl_type','=','tk')
]
</field>
<field
name=
"context"
>
{'search_default_filter_state_not_finished':1}
</field>
<field
name=
"context"
>
{'search_default_filter_state_not_finished':1}
</field>
<field
name=
"view_id"
ref=
"tree_cc_bl_view"
/>
<field
name=
"help"
type=
"html"
>
<field
name=
"help"
type=
"html"
>
<p>
<p>
</p>
</p>
</field>
</field>
</record>
</record>
<!--
<record model="ir.ui.view" id="tree_temu_cc_bl_view">
<field name="name">tree.temu.cc.bl</field>
<field name="model">cc.bl</field>
<field name="arch" type="xml">
<tree string="Temu Bill of Loading" decoration-warning="is_cancel==True" js_class="cc_temu_bl_tree">
<field optional="show" name="state" string="Status" widget="badge" decoration-info="state=='draft'"
decoration-primary="state=='ccing'" decoration-success="state=='done'"/>
<field optional="show" name="customs_clearance_status" string="Customs Clearance Status"/>
<field optional="show" name="bl_no" string="Bill of Loading No."/>
<field optional="show" name="bl_date" string="B/L Date"/>
<field optional="show" name="last_mile_provider_ids" string="Last Mile Providers"
widget="many2many_tags"/>
<field optional="hide" name="transfer_bl_no" string="Transfer Bill of Loading No."/>
<field optional="show" name="customer_id" string="Customer"/>
<field optional="show" name="customs_bl_no" string="Customs Bill of Loading No."/>
<field optional="hide" name="big_package_sell_country" string="Sell Country"/>
<field optional="hide" name="billing_weight" string="Billing Weight"/>
<field optional="hide" name="actual_weight" string="Actual Weight"/>
<field optional="hide" name="big_package_qty" string="Big Package"/>
<field optional="hide" name="bl_total_big_qty" string="Receive Big Package"/>
<field optional="hide" name="bl_ship_package_qty" string="Receive Ship Package"/>
<field optional="hide" name="bl_total_qty" string="Receive Goods Qty"/>
<field optional="show" name="bl_total_amount" string="Total Amount"/>
<field optional="show" name="cc_company_id" string="CC Company"/>
<field optional="show" name="cc_country_id" string="CC Country"/>
<field optional="show" name="cc_deadline" string="CC Deadline"/>
<field optional="show" name="trade_type" string="Trade Type"/>
<field optional="hide" name="transport_tool_code" string="Transport Tool Code"/>
<field optional="hide" name="transport_tool_name" string="Transport Tool Name"/>
<field optional="show" name="start_port_code" string="Start Port Code"/>
<field optional="show" name="eta" string="ETA"/>
<field optional="show" name="end_port_code" string="End Port Code"/>
<field optional="show" name="etd" string="ETD"/>
<field optional="show" name="is_cancel" string="Is Cancel"/>
<field optional="hide" name="cancel_reason" string="Cancel Reason"/>
<field optional="show" name="create_date"/>
</tree>
</field>
</record> -->
<record
model=
"ir.actions.act_window"
id=
"action_temu_bl"
>
<field
name=
"name"
>
TEMU Bill of Loading
</field>
<field
name=
"res_model"
>
cc.bl
</field>
<field
name=
"view_mode"
>
tree,form,pivot,graph,calendar
</field>
<field
name=
"domain"
>
[('bl_type','=','temu')]
</field>
<field
name=
"view_id"
ref=
"tree_cc_bl_view"
/>
<!-- <field name="view_id" ref="tree_temu_cc_bl_view"/> -->
<field
name=
"context"
>
{'search_default_filter_state_not_finished':1}
</field>
<field
name=
"help"
type=
"html"
>
<p>
</p>
</field>
</record>
<!--<!– <record model="ir.ui.view" id="search_cc_bl_view">–>-->
<!--<!– <field name="name">search.cc.bl</field>–>-->
<!--<!– <field name="model">cc.bl</field>–>-->
<!--<!– <field name="arch" type="xml">–>-->
<!--<!– <search string="Bill of Loading">–>-->
<!--<!– <field name="bl_no" string="Fuzzy Search"–>-->
<!--<!– filter_domain="['|', ('bl_no', 'ilike', self), '|', ('cc_company_id.name', 'ilike', self),('customer_id.name', 'ilike', self)]"/>–>-->
<!--<!– <separator/>–>-->
<!--<!– <field name="bl_no" string="B/L No."/>–>-->
<!--<!– <field name="customer_id" string="Customer"/>–>-->
<!--<!– <field name="cc_country_id" string="CC Country"/>–>-->
<!--<!– <field name="cc_company_id" string="CC Company"/>–>-->
<!--<!– <field name="bl_date" string="B/L Date"/>–>-->
<!--<!– <field name="bl_total_amount" string="B/L Total Amount"/>–>-->
<!--<!– <field name="bl_total_qty" string="B/L Total Qty"/>–>-->
<!--<!– <field name="cc_progress" string="Current CC Progress"/>–>-->
<!--<!– <field name="cc_progress_date" string="Current CC Progress Date"/>–>-->
<!--<!– <field name="state" string="Status"/>–>-->
<!--<!– <separator/>–>-->
<!--<!– <filter name="filter_bl_date" string="B/L Date" date="bl_date"/>–>-->
<!--<!–<!– # 增加一个过滤器, 用于显示今天到期的单据–>–>-->
<!--<!– <filter name="filter_today_deadline" string="Today Deadline" domain="[('cc_deadline', '=', time.strftime('%Y-%m-%d'))]"/>–>-->
<!--<!–<!– # 增加一个过滤器,用于显示已经到期的单据–>–>-->
<!--<!– <filter name="filter_deadline" string="Deadline" domain="[('cc_deadline', '<', time.strftime('%Y-%m-%d'))]"/>–>-->
<!--<!– <separator/>–>-->
<!--<!– <group expand="0" string="Group By">–>-->
<!--<!– <filter domain="[]" name="groupby_customer_id" string="Customer"–>-->
<!--<!– context="{'group_by': 'customer_id'}"/>–>-->
<!--<!– <filter domain="[]" name="groupby_cc_country_id" string="CC Country"–>-->
<!--<!– context="{'group_by': 'cc_country_id'}"/>–>-->
<!--<!– <filter domain="[]" name="groupby_cc_company_id" string="CC Company"–>-->
<!--<!– context="{'group_by': 'cc_company_id'}"/>–>-->
<!--<!– <filter domain="[]" name="groupby_state" string="Status" context="{'group_by': 'state'}"/>–>-->
<!--<!– </group>–>-->
<!--<!– <searchpanel>–>-->
<!--<!– <field icon="fa-users" name="state"/>–>-->
<!--<!– <field icon="fa-users" select="multi" name="cc_country_id" enable_counters="1"/>–>-->
<!--<!– </searchpanel>–>-->
<!--<!– </search>–>-->
<!--<!– </field>–>-->
<!--<!– </record>–>-->
<!-- <record model="ir.actions.act_window" id="action_cc_bl">-->
<!-- <field name="name">Bill of Loading</field>-->
<!-- <field name="res_model">cc.bl</field>-->
<!-- <field name="view_mode">tree,form,pivot,graph</field>-->
<!-- <field name="domain">[]</field>-->
<!-- <field name="context">{-->
<!-- 'search_default_filter_today_deadline': 1,-->
<!-- }</field>-->
<!-- <field name="help" type="html">-->
<!-- <p class="o_view_nocontent_smiling_face">-->
<!-- [Bill of Loading] Not yet! Click the Create button in the top left corner and the sofa is yours!-->
<!-- </p>-->
<!-- <p>-->
<!-- </p>-->
<!-- </field>-->
<!-- </record>-->
<!-- 导出报关数据 <menuitem sequence="10" name="Bill of Loading" id="menu_cc_bl" action="action_cc_bl" web_icon="ccs_base,static/description/icon3.png"/>-->
<!-- 导出报关数据 <menuitem sequence="10" name="Bill of Loading" id="menu_cc_bl" action="action_cc_bl" web_icon="ccs_base,static/description/icon3.png"/>-->
<record
id=
"export_order_big_package_xls_server"
model=
"ir.actions.server"
>
<record
id=
"export_order_big_package_xls_server"
model=
"ir.actions.server"
>
...
@@ -483,4 +467,19 @@
...
@@ -483,4 +467,19 @@
</field>
</field>
</record>
</record>
<!-- 批量创建temu提单 -->
<record
id=
"bl_create_temu_bl_server_action"
model=
"ir.actions.server"
>
<field
name=
"name"
>
Batch Create BL
</field>
<field
name=
"model_id"
ref=
"model_cc_bl"
/>
<field
name=
"binding_model_id"
ref=
"model_cc_bl"
/>
<field
name=
"state"
>
code
</field>
<field
name=
"binding_view_types"
>
list,form
</field>
<field
name=
"groups_id"
eval=
"[(4, ref('ccs_base.group_clearance_of_customs_user'))]"
/>
<field
name=
"code"
>
if records:
action = records.action_batch_get_pod_info()
</field>
</record>
</odoo>
</odoo>
\ No newline at end of file
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"
/>
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
Synchronize POD (Proof of Delivery) attachment information with TK system, including
Synchronize POD (Proof of Delivery) attachment information with TK system, including
big package quantities and container numbers
big package quantities and container numbers
</li>
<!-- 同步尾程POD:向TK同步尾程交接POD(待大包数量和箱号)的附件信息 -->
</li>
<!-- 同步尾程POD:向TK同步尾程交接POD(待大包数量和箱号)的附件信息 -->
<li
attrs=
"{'invisible': [('sync_successful_processed', '=', False)]}"
>
<li
attrs=
"{'invisible': [('sync_successful_processed', '=', False)]}"
>
<strong>
Sync Push Match Node:
</strong>
<strong>
Sync Push Match Node:
</strong>
Synchronize and push matched node information based on POD file, extract time from
Synchronize and push matched node information based on POD file, extract time from
...
@@ -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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论