加班单
This commit is contained in:
@@ -65,6 +65,8 @@
|
||||
'views/meal_approval.xml',
|
||||
'views/applet_address_views.xml',
|
||||
'views/all_attendance_menu.xml',
|
||||
'views/overtime_approval_inherit_header.xml',
|
||||
|
||||
|
||||
'wizard/hr_attendance_month_wizard_views.xml',
|
||||
'wizard/yuthon_delete_planning_wizard_views.xml',
|
||||
@@ -76,6 +78,8 @@
|
||||
'wizard/planning_slot_update_display_name_wizard.xml',
|
||||
'wizard/yuthon_run_wizard.xml',
|
||||
'wizard/applet_security_quick_perm_views.xml',
|
||||
'report/overtime_approval_report.xml',
|
||||
'report/overtime_approval_templates.xml',
|
||||
],
|
||||
'assets': {
|
||||
'web.assets_backend': [
|
||||
@@ -94,6 +98,8 @@
|
||||
'yuthon_hr_attendance/static/src/js/button_vacation_put.js',
|
||||
'yuthon_hr_attendance/static/src/xml/button_vacation_put.xml',
|
||||
'yuthon_hr_attendance/static/src/planning_gantt/planning_gantt_controller.xml',
|
||||
|
||||
|
||||
],
|
||||
},
|
||||
'installable': True,
|
||||
|
||||
@@ -48,6 +48,10 @@ class OvertimeApprovals(models.Model):
|
||||
work_end = fields.Boolean(string="结束")
|
||||
is_over = fields.Boolean(string="超过", compute="_compute_duration")
|
||||
|
||||
def action_print_overtime(self):
|
||||
self.ensure_one()
|
||||
return self.env.ref('yuthon_hr_attendance.action_overtime_approval_print').report_action(self)
|
||||
|
||||
def _get_default_name_title(self):
|
||||
return self._description if self._description else self._name
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<odoo>
|
||||
<record id="action_overtime_approval_print" model="ir.actions.report">
|
||||
<field name="name">加班单</field>
|
||||
<field name="model">overtime.approval</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">yuthon_hr_attendance.overtime_approval_print_template</field>
|
||||
<field name="report_file">yuthon_hr_attendance.overtime_approval_print_template</field>
|
||||
<field name="print_report_name">'加班单-%s' % (object.code or object.name)</field>
|
||||
<field name="binding_model_id" ref="model_overtime_approval"/>
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,78 @@
|
||||
<odoo>
|
||||
<template id="overtime_approval_print_template">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="doc">
|
||||
<t t-call="web.external_layout">
|
||||
<div class="page">
|
||||
<style type="text/css">
|
||||
td { border:1px solid #000; padding:6px; }
|
||||
table { border-collapse: collapse; width:50%; margin:0 auto; }
|
||||
.title { text-align:center; font-weight:bold; font-size:18px; margin:5px 0 10px 0; }
|
||||
.hdr { background:#f0f0f0; font-weight:bold; width:15%; text-align:center; }
|
||||
.section { text-align:center; font-weight:bold; background:#d4e6f1; }
|
||||
.hdr-row td { font-weight:bold; background:#f0f0f0; text-align:center; }
|
||||
.meta { display:table; width:50%; margin:0 auto 10px auto; font-weight:bold; }
|
||||
.meta .left { display:table-cell; width:50%; text-align:left; }
|
||||
.meta .right { display:table-cell; width:50%; text-align:right; }
|
||||
</style>
|
||||
|
||||
<div class="title">加班单</div>
|
||||
|
||||
<div class="meta">
|
||||
<div class="left">
|
||||
<strong>部门:</strong><span t-esc="doc.department_id.name or ''"/>
|
||||
</div>
|
||||
<div class="right">
|
||||
<strong>申请日期:</strong><span t-esc="doc.create_date and doc.create_date.strftime('%Y-%m-%d') or ''"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td class="hdr">事由</td>
|
||||
<td colspan="3">
|
||||
<span t-esc="doc.reason_application or ''"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="hdr">加班人</td>
|
||||
<td colspan="3">
|
||||
<t t-foreach="doc.employee_ids" t-as="emp">
|
||||
<span t-esc="emp.name"/><br/>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="hdr">时间</td>
|
||||
<td colspan="3">
|
||||
<span t-esc="doc.start_time and doc.start_time.strftime('%Y-%m-%d %H:%M') or ''"/> 至
|
||||
<span t-esc="doc.end_time and doc.end_time.strftime('%Y-%m-%d %H:%M') or ''"/>,
|
||||
时长 <span t-esc="doc.duration or 0.0"/> 小时
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- 审批详情 -->
|
||||
<tr><td class="section" colspan="4">审批详情</td></tr>
|
||||
<tr class="hdr-row">
|
||||
<td class="hdr">节点名称</td>
|
||||
<td class="hdr">意见</td>
|
||||
<td class="hdr">审批人-时间</td>
|
||||
</tr>
|
||||
<t t-foreach="doc.log_ids.sorted('sequence')" t-as="log">
|
||||
<tr>
|
||||
<td><span t-esc="log.name"/></td>
|
||||
<td><span t-esc="log.comment"/></td>
|
||||
<td>
|
||||
<t t-if="log.done_by">
|
||||
<span t-esc="log.done_by.name"/> - <span t-esc="log.lase_click_date and log.lase_click_date.strftime('%Y%m%d') or ''"/>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
</table>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</odoo>
|
||||
@@ -15,6 +15,7 @@
|
||||
<field name="model">overtime.approval</field>
|
||||
<field name="arch" type="xml">
|
||||
<form create="0">
|
||||
|
||||
<!-- <header>-->
|
||||
<!-- <button name="put_hr_employee" type="object" string="Approve" class="oe_highlight"/>-->
|
||||
<!-- </header>-->
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<odoo>
|
||||
<record id="overtime_approval_form_print_inherit" model="ir.ui.view">
|
||||
<field name="name">overtime.approval.form.print.inherit</field>
|
||||
<field name="model">overtime.approval</field>
|
||||
<field name="inherit_id" ref="yuthon_hr_attendance.overtime_approval_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//form/sheet" position="before">
|
||||
<header>
|
||||
<button name="action_print_overtime"
|
||||
type="object"
|
||||
string="打印"
|
||||
class="btn btn-secondary"/>
|
||||
</header>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -11,13 +11,9 @@
|
||||
'security/ir.model.access.csv',
|
||||
'security/company_rule.xml',
|
||||
'data/process_code_data.xml',
|
||||
'report/purchase_workflow_report.xml',
|
||||
'report/purchase_workflow_templates.xml',
|
||||
'views/inherit_product_product_views.xml',
|
||||
'views/inherit_purchase_order_views.xml',
|
||||
'views/purchase_workflow_views.xml',
|
||||
'report/purchase_workflow_print_report.xml',
|
||||
'report/purchase_workflow_print_templates.xml',
|
||||
'report/purchase_order_print_report.xml',
|
||||
'report/purchase_order_print_templates.xml',
|
||||
],
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<!-- 采购审批单打印报表 -->
|
||||
<record id="action_purchase_workflow_print_report" model="ir.actions.report">
|
||||
<field name="name">采购审批单</field>
|
||||
<field name="model">purchase.workflow</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">yuthon_purchase.purchase_workflow_print_template</field>
|
||||
<field name="report_file">yuthon_purchase.purchase_workflow_print_template</field>
|
||||
<field name="print_report_name">'采购审批单-%s' % (object.code or '')</field>
|
||||
<field name="binding_model_id" ref="model_purchase_workflow"/>
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -1,225 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<template id="purchase_workflow_print_template">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="doc">
|
||||
<t t-call="web.external_layout">
|
||||
<div class="page">
|
||||
<style type="text/css">
|
||||
td { border:1px solid #000; padding:6px; }
|
||||
table { border-collapse: collapse; width:100%; margin:0; }
|
||||
.title {
|
||||
text-align:center;
|
||||
font-weight:bold;
|
||||
font-size:18px;
|
||||
margin:15px 0 0 0;
|
||||
background-color: #2c5f8d;
|
||||
color: white;
|
||||
padding: 12px;
|
||||
}
|
||||
.header-cell {
|
||||
background-color: #d4e6f1;
|
||||
font-weight: bold;
|
||||
}
|
||||
table tr:nth-child(even) {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="title">采购审批单</div>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td width="12%" class="header-cell"><strong>部门</strong></td>
|
||||
<td width="21%" colspan="2"><span t-esc="doc.department_id.name or ''"/></td>
|
||||
<td width="12%" class="header-cell"><strong>承办人</strong></td>
|
||||
<td width="21%" colspan="2"><span t-esc="doc.user_id.name or ''"/></td>
|
||||
<td width="12%" class="header-cell"><strong>申请日期</strong></td>
|
||||
<td width="21%" colspan="2"><span t-esc="doc.start_date and doc.start_date.strftime('%Y-%m-%d') or ''"/></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="header-cell"><strong>事项标题</strong></td>
|
||||
<td colspan="8"><span t-esc="doc.name or ''"/></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="header-cell"><strong>供应商</strong></td>
|
||||
<td colspan="8"><span t-esc="doc.partner_id.name or ''"/></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="header-cell"><strong>采购标的类型</strong></td>
|
||||
<td colspan="8">
|
||||
<t t-if="doc.purchase_type == 'fixed'">固定资产</t>
|
||||
<t t-elif="doc.purchase_type == 'low'">低值易耗</t>
|
||||
<t t-elif="doc.purchase_type == 'service'">服务</t>
|
||||
<t t-elif="doc.purchase_type == 'day'">日常消耗品</t>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="header-cell"><strong>付款方式</strong></td>
|
||||
<td colspan="3">
|
||||
<t t-if="doc.pay_way == 'onetime'">一次性</t>
|
||||
<t t-elif="doc.pay_way == 'installment'">分期</t>
|
||||
</td>
|
||||
<td class="header-cell" colspan="2"><strong>总金额</strong></td>
|
||||
<td colspan="3">
|
||||
<t t-set="total_amount" t-value="0"/>
|
||||
<t t-if="doc.purchase_type == 'fixed' or doc.purchase_type == 'day'">
|
||||
<t t-set="total_amount" t-value="sum(doc.fixed_line_ids.mapped('total'))"/>
|
||||
</t>
|
||||
<t t-elif="doc.purchase_type == 'low'">
|
||||
<t t-set="total_amount" t-value="sum(doc.low_line_ids.mapped('total'))"/>
|
||||
</t>
|
||||
<t t-elif="doc.purchase_type == 'service'">
|
||||
<t t-set="total_amount" t-value="sum(doc.service_line_ids.mapped('total'))"/>
|
||||
</t>
|
||||
<span t-esc="'%.2f' % total_amount"/>元
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="header-cell"><strong>申请事由</strong></td>
|
||||
<td colspan="8"><span t-esc="doc.reason_text or ''"/></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="header-cell" rowspan="1"><strong>附件</strong></td>
|
||||
<td colspan="8">
|
||||
<t t-if="doc.document_ids">
|
||||
<t t-foreach="doc.document_ids" t-as="att">
|
||||
<div><span t-esc="att.name"/></div>
|
||||
</t>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- 采购明细标题行 -->
|
||||
<tr>
|
||||
<td colspan="9" style="text-align:center; background-color:#ffc; font-weight:bold; border:1px solid #000;">采购明细</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%" class="header-cell"><strong>产品</strong></td>
|
||||
<td width="15%" class="header-cell" colspan="2"><strong>数量</strong></td>
|
||||
<td width="15%" class="header-cell" colspan="2"><strong>单位</strong></td>
|
||||
<td width="15%" class="header-cell" colspan="2"><strong>单价</strong></td>
|
||||
<td width="15%" class="header-cell" colspan="2"><strong>税</strong></td>
|
||||
</tr>
|
||||
|
||||
<!-- 固定资产/日常消耗品明细 -->
|
||||
<t t-if="doc.purchase_type in ['fixed', 'day']">
|
||||
<t t-if="doc.fixed_line_ids">
|
||||
<t t-foreach="doc.fixed_line_ids" t-as="line">
|
||||
<tr>
|
||||
<td><span t-esc="line.product_id.name or ''"/></td>
|
||||
<td colspan="2"><span t-esc="line.number or 0"/></td>
|
||||
<td colspan="2"><span t-esc="line.unit_id.name or ''"/></td>
|
||||
<td colspan="2"><span t-esc="'%.2f' % (line.price_unit or 0)"/></td>
|
||||
<td colspan="2"><span t-esc="line.taxes_id.name or ''"/></td>
|
||||
</tr>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
<!-- 低值易耗明细 -->
|
||||
<t t-if="doc.purchase_type == 'low'">
|
||||
<t t-if="doc.low_line_ids">
|
||||
<t t-foreach="doc.low_line_ids" t-as="line">
|
||||
<tr>
|
||||
<td><span t-esc="line.product_id.name or ''"/></td>
|
||||
<td colspan="2"><span t-esc="line.number or 0"/></td>
|
||||
<td colspan="2"><span t-esc="line.unit_id.name or ''"/></td>
|
||||
<td colspan="2"><span t-esc="'%.2f' % (line.price or 0)"/></td>
|
||||
<td colspan="2"><span t-esc="line.taxes_id.name or ''"/></td>
|
||||
</tr>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
<!-- 服务明细 -->
|
||||
<t t-if="doc.purchase_type == 'service'">
|
||||
<t t-if="doc.service_line_ids">
|
||||
<t t-foreach="doc.service_line_ids" t-as="line">
|
||||
<tr>
|
||||
<td><span t-esc="line.product_id.name or ''"/></td>
|
||||
<td colspan="2"><span t-esc="line.frequency or 0"/></td>
|
||||
<td colspan="2"><span t-esc="line.unit_id.name or ''"/></td>
|
||||
<td colspan="2"><span t-esc="'%.2f' % (line.price or 0)"/></td>
|
||||
<td colspan="2"><span t-esc="line.taxes_id.name or ''"/></td>
|
||||
</tr>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
<!-- 分期付款明细(仅在付款方式为"分期"时显示) -->
|
||||
<t t-if="doc.pay_way == 'installment'">
|
||||
<tr>
|
||||
<td colspan="9" style="text-align:center; background-color:#ffc; font-weight:bold; border:1px solid #000;">
|
||||
分期付款明细
|
||||
<span style="float:right; font-size:12px; font-weight:normal;">付款方式 "一次性" 隐藏</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%" class="header-cell" colspan="2"><strong>付款阶段</strong></td>
|
||||
<td width="25%" class="header-cell" colspan="2"><strong>比例/金额</strong></td>
|
||||
<td width="25%" class="header-cell" colspan="2"><strong>付款日期</strong></td>
|
||||
<td width="25%" class="header-cell" colspan="3"><strong>条件</strong></td>
|
||||
</tr>
|
||||
<t t-if="doc.pay_line_ids">
|
||||
<t t-foreach="doc.pay_line_ids" t-as="pay_line">
|
||||
<tr>
|
||||
<td colspan="2"><span t-esc="pay_line.payment_stage or ''"/></td>
|
||||
<td colspan="2"><span t-esc="pay_line.amount or ''"/></td>
|
||||
<td colspan="2"><span t-esc="pay_line.payment_date and pay_line.payment_date.strftime('%Y-%m-%d') or ''"/></td>
|
||||
<td colspan="3"><span t-esc="pay_line.remake or ''"/></td>
|
||||
</tr>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
<!-- 审批详情标题行 -->
|
||||
<tr>
|
||||
<td class="header-cell" colspan="9" style="text-align:center;"><strong>审批详情</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="12%" class="header-cell" colspan="1"><strong>节点名称</strong></td>
|
||||
<td width="25%" class="header-cell" colspan="2"><strong>意见</strong></td>
|
||||
<td width="20%" class="header-cell" colspan="2"><strong>审批人 - 操作时间</strong></td>
|
||||
<td width="10%" class="header-cell" colspan="2"><strong>状态</strong></td>
|
||||
<td width="18%" class="header-cell" colspan="2"><strong>附件</strong></td>
|
||||
</tr>
|
||||
<t t-if="doc.log_ids">
|
||||
<t t-foreach="doc.log_ids.sorted('sequence')" t-as="log">
|
||||
<tr>
|
||||
<td colspan="1"><span t-esc="log.name"/></td>
|
||||
<td colspan="2"><span t-esc="log.comment"/></td>
|
||||
<td colspan="2">
|
||||
<t t-if="log.done_by">
|
||||
<span t-esc="log.done_by.name"/> - <span t-esc="log.lase_click_date and log.lase_click_date.strftime('%Y%m%d') or ''"/>
|
||||
</t>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<t t-if="log.approval_state == '0'">待办</t>
|
||||
<t t-elif="log.approval_state == '1'">办理中</t>
|
||||
<t t-elif="log.approval_state == '2'">已办结</t>
|
||||
<t t-elif="log.approval_state == '3'">结束</t>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<t t-if="log.document_ids">
|
||||
<t t-foreach="log.document_ids" t-as="doc_att">
|
||||
<div><span t-esc="doc_att.name"/></div>
|
||||
</t>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
</t>
|
||||
</table>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</odoo>
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="action_purchase_workflow_report" model="ir.actions.report">
|
||||
<field name="name">采购审批报表</field>
|
||||
<field name="model">purchase.workflow</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">yuthon_purchase.report_purchaseworkflow</field>
|
||||
<field name="report_file">yuthon_purchase.report_purchaseworkflow</field>
|
||||
<field name="print_report_name">采购审批单</field>
|
||||
<field name="binding_model_id" ref="model_purchase_workflow"/>
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -1,357 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="report_purchaseworkflow">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="web.external_layout">
|
||||
<style type="text/css">
|
||||
td {
|
||||
border:1px solid #000000;
|
||||
padding:8px;
|
||||
}
|
||||
.title {
|
||||
text-align:center;
|
||||
font-weight:bold;
|
||||
font-size:16px;
|
||||
margin:15px 0;
|
||||
}
|
||||
.main-title {
|
||||
font-weight:bold;
|
||||
font-size:18px;
|
||||
text-align:center;
|
||||
margin:20px 0;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.content-wrap {
|
||||
white-space: pre-wrap;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.attachment-name {
|
||||
margin: 2px 0;
|
||||
display: block;
|
||||
}
|
||||
/* 明细标题盒子样式:带边框、字体居中 */
|
||||
.detail-title-box {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin: 15px 0 5px 0; /* 与上方间距15px,与下方明细表格间距5px */
|
||||
}
|
||||
.detail-title-box td {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
border:1px solid #000000;
|
||||
padding: 5px 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="main-title">采购审批单</div>
|
||||
|
||||
<!-- 编号 + 供应商 -->
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="15%"><strong>编号:</strong></td>
|
||||
<td width="35%"><span t-field="o.code"/></td>
|
||||
<td width="15%"><strong>供应商:</strong></td>
|
||||
<td width="35%">
|
||||
<span t-if="o.partner_id"><span t-field="o.partner_id.name"/></span>
|
||||
<span t-if="not o.partner_id">未设置</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- 标题 + 采购类型 -->
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="15%"><strong>标题:</strong></td>
|
||||
<td width="35%"><span t-field="o.name"/></td>
|
||||
<td width="15%"><strong>采购类型:</strong></td>
|
||||
<td width="35%">
|
||||
<span t-if="o.purchase_type == 'fixed'">固定资产</span>
|
||||
<span t-if="o.purchase_type == 'low'">低值易耗</span>
|
||||
<span t-if="o.purchase_type == 'service'">服务</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- 申请人 + 付款方式 -->
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="15%"><strong>申请人:</strong></td>
|
||||
<td width="35%">
|
||||
<span t-if="o.user_id"><span t-field="o.user_id.name"/></span>
|
||||
<span t-if="not o.user_id">未知</span>
|
||||
</td>
|
||||
<td width="15%"><strong>付款方式:</strong></td>
|
||||
<td width="35%">
|
||||
<span t-if="o.pay_way == 'onetime'">一次性</span>
|
||||
<span t-if="o.pay_way == 'installment'">分期</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- 申请日期 -->
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="15%"><strong>申请日期:</strong></td>
|
||||
<td width="85%"><span t-field="o.start_date"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- 合计金额 -->
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="15%"><strong>合计金额:</strong></td>
|
||||
<td width="85%"><span t-field="o.total"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- 申请事由 -->
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="15%"><strong>申请事由:</strong></td>
|
||||
<td width="85%" class="content-wrap">
|
||||
<t t-if="o.reason_text">
|
||||
<pre t-field="o.reason_text"/>
|
||||
</t>
|
||||
<t t-if="not o.reason_text">
|
||||
<span>无</span>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- 固定资产特有字段 -->
|
||||
<t t-if="o.purchase_type == 'fixed'">
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="15%"><strong>预计到货日期:</strong></td>
|
||||
<td width="85%"><span t-field="o.date_planned"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</t>
|
||||
|
||||
<!-- 服务特有字段 -->
|
||||
<t t-if="o.purchase_type == 'service'">
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="15%"><strong>服务开始日期</strong></td>
|
||||
<td width="85%"><span t-field="o.service_start_date"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="15%"><strong>服务结束日期</strong></td>
|
||||
<td width="85%"><span t-field="o.service_end_date"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="15%"><strong>服务年限:</strong></td>
|
||||
<td width="85%"><span t-field="o.service_year"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="15%"><strong>营业执照:</strong></td>
|
||||
<td width="85%">
|
||||
<span t-if="o.license_id"><span t-field="o.license_id.name"/></span>
|
||||
<span t-if="not o.license_id">无</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="15%"><strong>资质:</strong></td>
|
||||
<td width="85%">
|
||||
<span t-if="o.aptitude_id"><span t-field="o.aptitude_id.name"/></span>
|
||||
<span t-if="not o.aptitude_id">无</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="15%"><strong>合同:</strong></td>
|
||||
<td width="85%">
|
||||
<span t-if="o.contract_id"><span t-field="o.contract_id.name"/></span>
|
||||
<span t-if="not o.contract_id">无</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</t>
|
||||
|
||||
<t t-if="o.purchase_type == 'fixed'">
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="100%" style="text-align:center;">固定资产明细</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="15%"><strong>物品名称</strong></td>
|
||||
<td width="10%"><strong>品牌</strong></td>
|
||||
<td width="10%"><strong>规格</strong></td>
|
||||
<td width="10%"><strong>数量</strong></td>
|
||||
<td width="10%"><strong>单位</strong></td>
|
||||
<td width="15%"><strong>单价</strong></td>
|
||||
<td width="20%"><strong>合计</strong></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-foreach="o.fixed_line_ids" t-as="line">
|
||||
<tr>
|
||||
<td><span t-field="line.product_id.name"/></td>
|
||||
<td><span t-field="line.brand"/></td>
|
||||
<td><span t-field="line.specs"/></td>
|
||||
<td><span t-field="line.number"/></td>
|
||||
<td><span t-field="line.unit_id.name"/></td>
|
||||
<td><span t-field="line.price_unit"/></td>
|
||||
<td><span t-field="line.total"/></td>
|
||||
</tr>
|
||||
</t>
|
||||
</tbody>
|
||||
</table>
|
||||
</t>
|
||||
|
||||
<t t-if="o.purchase_type == 'low'">
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="100%" style="text-align:center;">低值易耗明细</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="15%"><strong>物品名称</strong></td>
|
||||
<td width="10%"><strong>品牌</strong></td>
|
||||
<td width="10%"><strong>规格</strong></td>
|
||||
<td width="10%"><strong>数量</strong></td>
|
||||
<td width="10%"><strong>单位</strong></td>
|
||||
<td width="15%"><strong>单价</strong></td>
|
||||
<td width="20%"><strong>合计</strong></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-foreach="o.low_line_ids" t-as="line">
|
||||
<tr>
|
||||
<td><span t-field="line.product_id.name"/></td>
|
||||
<td><span t-field="line.brand"/></td>
|
||||
<td><span t-field="line.specs"/></td>
|
||||
<td><span t-field="line.number"/></td>
|
||||
<td><span t-field="line.unit_id.name"/></td>
|
||||
<td><span t-field="line.price"/></td>
|
||||
<td><span t-field="line.total"/></td>
|
||||
</tr>
|
||||
</t>
|
||||
</tbody>
|
||||
</table>
|
||||
</t>
|
||||
<t t-if="o.purchase_type == 'service'">
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="100%" style="text-align:center;">服务明细</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="20%"><strong>服务项目</strong></td>
|
||||
<td width="10%"><strong>频次</strong></td>
|
||||
<td width="15%"><strong>费用</strong></td>
|
||||
<td width="10%"><strong>单位</strong></td>
|
||||
<td width="15%"><strong>单价</strong></td>
|
||||
<td width="20%"><strong>合计</strong></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-foreach="o.service_line_ids" t-as="line">
|
||||
<tr>
|
||||
<td><span t-field="line.product_id.name"/></td>
|
||||
<td><span t-field="line.frequency"/></td>
|
||||
<td><span t-field="line.fee"/></td>
|
||||
<td><span t-field="line.unit_id.name"/></td>
|
||||
<td><span t-field="line.price"/></td>
|
||||
<td><span t-field="line.total"/></td>
|
||||
</tr>
|
||||
</t>
|
||||
</tbody>
|
||||
</table>
|
||||
</t>
|
||||
|
||||
<t t-if="o.pay_way == 'installment'">
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="100%" style="text-align:center;">付款详情</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="20%"><strong>付款阶段</strong></td>
|
||||
<td width="20%"><strong>比例/金额</strong></td>
|
||||
<td width="30%"><strong>付款日期</strong></td>
|
||||
<td width="30%"><strong>条件</strong></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-foreach="o.pay_line_ids" t-as="line">
|
||||
<tr>
|
||||
<td><span t-field="line.payment_stage"/></td>
|
||||
<td><span t-field="line.amount"/></td>
|
||||
<td><span t-field="line.payment_date"/></td>
|
||||
<td><span t-field="line.remake"/></td>
|
||||
</tr>
|
||||
</t>
|
||||
</tbody>
|
||||
</table>
|
||||
</t>
|
||||
|
||||
<!-- 附件 -->
|
||||
<t t-if="o.document_ids">
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="15%"><strong>附件:</strong></td>
|
||||
<td width="85%">
|
||||
<t t-foreach="o.document_ids" t-as="doc">
|
||||
<div class="attachment-name"><span t-field="doc.name"/></div>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</t>
|
||||
|
||||
<t t-if="o.log_ids">
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<td width="100%" style="text-align:center;">审批明细</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" style="table-layout:fixed;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="20%"><strong>节点</strong></td>
|
||||
<td width="30%"><strong>意见</strong></td>
|
||||
<td width="20%"><strong>审批人</strong></td>
|
||||
<td width="30%"><strong>操作时间</strong></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-foreach="o.log_ids" t-as="log">
|
||||
<tr>
|
||||
<td><span t-field="log.name"/></td>
|
||||
<td><span t-field="log.comment"/></td>
|
||||
<td><span t-field="log.done_by"/></td>
|
||||
<td><span t-field="log.date_create"/></td>
|
||||
</tr>
|
||||
</t>
|
||||
</tbody>
|
||||
</table>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user