Files
gzth/yuthon_property_approval/report/property_lease_renewal_template.xml
T
2026-09-21 15:18:18 +08:00

206 lines
12 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="property_lease_renewal_template">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="web.external_layout">
<style type="text/css">
table { border-collapse: collapse; width: 100%; max-width: 800px; margin: 0 auto; table-layout: fixed; }
td { border: 1px solid #000; padding: 6px; text-align: center; vertical-align: middle; }
.title {
text-align: center;
font-weight: bold;
font-size: 18px;
padding: 8px 0;
}
.header-cell { font-weight: bold; background-color: #d4e6f1; }
.section-header { background-color: #d4e6f1; text-align: center; }
.text-left { text-align: left; }
.no-right-border { border-right: none !important; }
.no-left-border { border-left: none !important; }
</style>
<!-- 流水号 -->
<div style="margin-bottom:8px; text-align:left; color:#999999;">
流水号:<span t-esc="doc.code or ''"/>
</div>
<!-- 标题 -->
<div class="title">租赁变更审批</div>
<table>
<colgroup>
<col style="width:15%"/>
<col style="width:35%"/>
<col style="width:15%"/>
<col style="width:35%"/>
</colgroup>
<!-- 基本信息 -->
<tr>
<td class="header-cell"><strong>标题</strong></td>
<td colspan="3"><span t-esc="doc.name or ''"/></td>
</tr>
<tr>
<td class="header-cell"><strong>变更类型</strong></td>
<td>
<t t-if="doc.renewal_type == 'lease'">承租方变更</t>
<t t-elif="doc.renewal_type == 'extend'">延长租期</t>
</td>
<td class="header-cell"><strong>紧急程度</strong></td>
<td>
<t t-if="doc.urgency_level == 'normal'">普件</t>
<t t-elif="doc.urgency_level == 'urgent'">急件</t>
<t t-elif="doc.urgency_level == 'emergency'">特急件</t>
</td>
</tr>
<tr>
<td class="header-cell"><strong>经办意见</strong></td>
<td colspan="3" class="text-left"><span t-esc="doc.reason or ''"/></td>
</tr>
<!-- 原租赁合同信息 -->
<tr>
<td colspan="4" class="section-header"><strong>原租赁合同信息</strong></td>
</tr>
<tr>
<td class="header-cell"><strong>原承租方</strong></td>
<td><span t-esc="doc.lessee_id.name or ''"/></td>
<td class="header-cell"><strong>租赁合同</strong></td>
<td><span t-esc="doc.contract_id.name or ''"/></td>
</tr>
<tr>
<td class="header-cell"><strong>租金支付周期</strong></td>
<td>
<t t-if="doc.cycle_dict == 'monthly'">月度</t>
<t t-elif="doc.cycle_dict == 'quarter'">季度</t>
<t t-elif="doc.cycle_dict == 'half'">半年</t>
<t t-elif="doc.cycle_dict == 'year'">年度</t>
</td>
<td class="header-cell"><strong>租金</strong></td>
<td><span t-esc="'%.2f' % doc.monthly_rent if doc.monthly_rent else '0.00'"/></td>
</tr>
<tr>
<td class="header-cell"><strong>合约起止</strong></td>
<td>
<span t-esc="doc.original_start_date and doc.original_start_date.strftime('%Y-%m-%d') or ''"/>
至
<span t-esc="doc.original_end_date and doc.original_end_date.strftime('%Y-%m-%d') or ''"/>
</td>
<td class="header-cell"><strong>物业信息</strong></td>
<td><span t-esc="doc.property_name or ''"/></td>
</tr>
<!-- 变更信息 -->
<tr>
<td colspan="4" class="section-header"><strong>变更信息</strong></td>
</tr>
<!-- 合同终止专属字段:相关字段已迁移至「租户退租表」(property.tenant.checkout),
本模型不再持有 early_* / deposit* / receivables_ids 字段,此处不再渲染,
历史 early_checkout 单据请到「租户退租表」打印。 -->
<!-- 承租方变更专属字段 -->
<t t-if="doc.renewal_type == 'lease'">
<tr>
<td class="header-cell"><strong>新承租方</strong></td>
<td><span t-esc="doc.new_lessee_id.name or ''"/></td>
<td class="header-cell"><strong>承租方类型</strong></td>
<td>
<t t-if="doc.entity_type == 'person'">个人</t>
<t t-elif="doc.entity_type == 'company'">企业</t>
</td>
</tr>
<tr>
<td class="header-cell"><strong>联系人</strong></td>
<td><span t-esc="doc.contact or ''"/></td>
<td class="header-cell"><strong>联系电话</strong></td>
<td><span t-esc="doc.phone or ''"/></td>
</tr>
<tr>
<td class="header-cell"><strong>身份证号</strong></td>
<td><span t-esc="doc.card or ''"/></td>
<td class="header-cell"><strong>变更费用</strong></td>
<td><span t-esc="'%.2f' % doc.fee if doc.fee else '0.00'"/></td>
</tr>
<tr>
<td class="header-cell"><strong>生效日期</strong></td>
<td colspan="3"><span t-esc="doc.effective_date and doc.effective_date.strftime('%Y-%m-%d') or ''"/></td>
</tr>
</t>
<!-- 延长租期专属字段 -->
<t t-if="doc.renewal_type == 'extend'">
<tr>
<td class="header-cell"><strong>实际结束日期</strong></td>
<td colspan="3"><span t-esc="doc.actual_end_date and doc.actual_end_date.strftime('%Y-%m-%d') or ''"/></td>
</tr>
</t>
<!-- 附件 -->
<t t-if="doc.document_ids">
<tr>
<td class="header-cell"><strong>附件</strong></td>
<td colspan="3" class="text-left">
<t t-foreach="doc.document_ids" t-as="att">
<div style="padding-left:1em;"><span t-esc="att.name"/></div>
</t>
</td>
</tr>
</t>
<!-- 应收明细:随「合同终止」业务迁移至「租户退租表」,本模型已无 receivables_ids 字段 -->
<!-- 租金明细(延长租期时显示) -->
<t t-if="doc.renewal_type == 'extend' and doc.breakdown_ids">
<tr>
<td colspan="4" class="section-header"><strong>租金明细</strong></td>
</tr>
<tr>
<td class="header-cell"><strong>单价</strong></td>
<td class="header-cell"><strong>月租金</strong></td>
<td class="header-cell"><strong>开始日期</strong></td>
<td class="header-cell"><strong>结束日期</strong></td>
</tr>
<t t-foreach="doc.breakdown_ids" t-as="line">
<tr>
<td><span t-esc="'%.4f' % line.unit_price if line.unit_price else '0.0000'"/></td>
<td><span t-esc="'%.2f' % line.monthly_amount if line.monthly_amount else '0.00'"/></td>
<td><span t-esc="line.start_data and line.start_data.strftime('%Y-%m-%d') or ''"/></td>
<td><span t-esc="line.end_data and line.end_data.strftime('%Y-%m-%d') or ''"/></td>
</tr>
<tr>
<td class="header-cell"><strong>期间月数</strong></td>
<td><span t-esc="line.month_number or 0"/></td>
<td class="header-cell"><strong>期间租金</strong></td>
<td><span t-esc="'%.2f' % line.period_rent if line.period_rent else '0.00'"/></td>
</tr>
</t>
</t>
<!-- 审批详情 -->
<tr>
<td colspan="4" class="section-header"><strong>审批详情</strong></td>
</tr>
<t t-if="doc.log_ids">
<t t-set="logs_ordered" t-value="doc.get_logs_for_print()"/>
<t t-foreach="logs_ordered" t-as="log">
<tr>
<td colspan="1"><span t-esc="log.name or '节点'"/></td>
<td class="no-right-border" colspan="2"><span t-esc="log.comment or ''"/></td>
<td class="no-left-border" colspan="1">
<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>
</t>
</table>
</t>
</t>
</t>
</template>
</odoo>