提交 6c94c62e authored 作者: 贺阳's avatar 贺阳

提单的动作(两种提单都需)新增:获取尾程快递POD【支持批量操作,权限与获取货站POD一致】

点击获取尾程快递POD,根据提单号向接口【curl -s -X POST 'http://172.104.52.150:7002/api/pod/pdfs' -H 'Content-Type: application/json' -d '{"bill_numbers":["436-10295434","436-10295423","436-10295574"]}'】取该提单号的尾程快递POD,若接口返回了数据,则显示该文件的预览,并在向导上方显示:上传到尾程交接POD(待大包数量和箱号):️【默认勾选】;同步给TK️【默认勾选,若提单类型为TEMU,则不显示该项,不同步】;若没有获取到文件则在向导上显示:xxxxx(提单号)没有获取到尾程快递POD文件。 根据选择将对应的文件同步到尾程快递POD附件内容,并同步给TK;
上级 bca1c12d
......@@ -26,6 +26,7 @@
'wizard/email_template.xml',
'wizard/bl_done_wizard_views.xml',
'wizard/batch_get_pod_info_wizard_views.xml',
'wizard/batch_get_lastmile_pod_info_wizard_views.xml',
'data/data.xml',
'data/timer.xml',
'data/sequence.xml',
......
差异被折叠。
......@@ -1263,9 +1263,9 @@ class CcBL(models.Model):
'name': _('Batch Get Last Mile POD Info'),
'type': 'ir.actions.act_window',
'view_mode': 'form',
'res_model': 'batch.get.pod.info.wizard',
'context': {'active_id': self.ids, 'default_action_type': '获取尾程POD信息'},
'views': [[self.env.ref('ccs_base.view_batch_get_pod_info_wizard_form').id, "form"]],
'res_model': 'batch.get.lastmile.pod.info.wizard',
'context': {'active_id': self.ids},
'views': [[self.env.ref('ccs_base.view_batch_get_lastmile_pod_info_wizard_form').id, "form"]],
'target': 'new',
}
......
......@@ -8,6 +8,7 @@ batch_update_transfer_bl_no_wizard_group_user,batch_update_transfer_bl_no_wizard
bl_done_wizard_group_user,bl_done_wizard_group_user,ccs_base.model_bl_done_wizard,base.group_user,1,1,1,1
batch_get_pod_info_wizard_group_user,batch_get_pod_info_wizard_group_user,ccs_base.model_batch_get_pod_info_wizard,base.group_user,1,1,1,1
access_group_user_common_common,access_group_user_common_common,model_common_common,base.group_user,1,1,1,1
batch_get_lastmile_pod_info_wizard_group_user,batch_get_lastmile_pod_info_wizard_group_user,ccs_base.model_batch_get_lastmile_pod_info_wizard,base.group_user,1,1,1,1
access_cc_node_base.group_user,cc_node base.group_user,ccs_base.model_cc_node,base.group_user,1,0,0,0
......
......@@ -8,4 +8,6 @@ from . import update_bl_status_wizard
from . import batch_update_transfer_bl_no_wizard
from . import bl_done_wizard
from . import batch_get_pod_info_wizard
from . import batch_get_lastmile_pod_info_wizard
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- Batch Get Last Mile POD Info Wizard Form View 批量获取尾程POD信息向导表单视图 -->
<record id="view_batch_get_lastmile_pod_info_wizard_form" model="ir.ui.view">
<field name="name">batch.get.lastmile.pod.info.wizard.form</field>
<field name="model">batch.get.lastmile.pod.info.wizard</field>
<field name="arch" type="xml">
<form string="Batch Get Last Mile POD Info"> <!-- 批量获取尾程POD信息 -->
<sheet>
<group>
<group>
<field name="get_last_mile_pod" widget="boolean_toggle" attrs="{'invisible': [('pdf_file','=',False)]}"/>
<field name="sync_last_mile_pod" widget="boolean_toggle" attrs="{'invisible': ['|', ('pdf_file','=',False), ('show_sync_last_mile_pod','=',False)]}"/>
<field name="show_sync_last_mile_pod" 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" attrs="{'invisible': [('pdf_file', '=', False)]}">
<strong>Description:</strong> <!-- 说明: -->
<ul>
<li>
<strong>Upload to Last Mile POD:</strong>
Write fetched PDF to BL attachments with name "Last Mile POD (pending big package count and box no.)"
</li>
<li attrs="{'invisible': [('show_sync_last_mile_pod','=',False)]}">
<strong>Sync to TK:</strong>
Sync the attachment information to TK.
</li>
</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)]}"/>
<!-- 确认按钮:使用已处理的文件数据进行回写 -->
<!-- 勾了上传或同步尾程POD信息,才显示确认按钮 -->
<button string="Confirm" type="object" name="confirm" class="btn-primary"
attrs="{'invisible': ['|', ('pdf_file','=',False), '&amp;', ('get_last_mile_pod','=',False), ('sync_last_mile_pod','=',False)]}"/>
</footer>
</sheet>
</form>
</field>
</record>
</data>
</odoo>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论