待办看板勾选框
This commit is contained in:
@@ -15,18 +15,28 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- 在“我的待办”kanban(soong.workflow.record.kanban)header 增加一键审批全部按钮,不依赖勾选 -->
|
||||
<!-- 在“我的待办”kanban(soong.workflow.record.kanban)增加勾选框 + 一键审批按钮
|
||||
行为:勾选了卡片 → 只批勾选的;没勾选 → 批全部待办加班(与列表视图语义一致) -->
|
||||
<record id="soong_workflow_record_kanban_batch_approve_all" model="ir.ui.view">
|
||||
<field name="name">soong.workflow.record.kanban.batch.all</field>
|
||||
<field name="model">soong.workflow.record</field>
|
||||
<field name="inherit_id" ref="soong_workflow.soong_workflow_record_kanban"/>
|
||||
<field name="arch" type="xml">
|
||||
<!-- 1) 挂自定义 js_class,启用卡片勾选能力(不影响标准 kanban 其它功能) -->
|
||||
<xpath expr="//kanban" position="attributes">
|
||||
<attribute name="js_class">soong_workflow_kanban_select</attribute>
|
||||
</xpath>
|
||||
<!-- 2) 卡片左上角加勾选框(record.id.raw_value 即记录 resId) -->
|
||||
<xpath expr="//t[@t-name='kanban-box']//div[hasclass('oe_kanban_card')]" position="inside">
|
||||
<input type="checkbox" class="wkf_card_check" t-att-data-id="record.id.raw_value"/>
|
||||
</xpath>
|
||||
<!-- 3) header 按钮:有勾选批选中,无勾选批全部 -->
|
||||
<xpath expr="//kanban" position="inside">
|
||||
<header>
|
||||
<button name="action_batch_approve_all" type="object" string="一键审批全部"
|
||||
<button name="action_batch_approve_all" type="object" string="一键审批"
|
||||
class="oe_highlight"
|
||||
display="always"
|
||||
confirm="你确定要审批所有加班待办吗?"/>
|
||||
confirm="确定要执行一键审批吗?"/>
|
||||
</header>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user