提交 3265143c authored 作者: 贺阳's avatar 贺阳

1.现有菜单提单改为TK提单

新增菜单TEMU提单,与提单属于同一个业务对象,界面一致,权限皆一致 2.客户上新增类型,可选类型:TK平台/TEMU平台 3.在TEMU提单上新增功能批量创建提单 点击批量创建,弹出向导: 客户:默认TEMU平台客户,任一一个,可修改 获取尾程POD信息️(默认勾选) 提单号:可输入多个,一行一个
上级 fd679109
...@@ -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',
], ],
}, },
......
...@@ -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):
......
...@@ -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')
/** @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);
},
};
...@@ -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);
},
}; };
...@@ -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() {
// 大包页面永远不显示“关联转单号”按钮 // 大包页面永远不显示“关联转单号”按钮
......
...@@ -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
...@@ -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>
/** @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
...@@ -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"
......
<?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
...@@ -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'
......
...@@ -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), '&amp;', ('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信息 -->
......
...@@ -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',
......
...@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论