Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
pengyuthon
2026-03-04 11:16:01 +08:00
3 changed files with 42 additions and 9 deletions
+6 -2
View File
@@ -12,7 +12,12 @@ class YuthonCatering(models.Model):
breakfast = fields.Boolean(string='早餐', default=False)
lunch = fields.Boolean(string='午餐', default=False)
menu_day_id = fields.Many2one('yuthon.menu.setting', string='菜单')
amount = fields.Float(string='结算费用')
amount = fields.Float(string='结算费用', compute='_compute_amount', store=True)
@api.depends('breakfast', 'lunch')
def _compute_amount(self):
for record in self:
record.amount = (1.0 if record.breakfast else 0.0) + (2.0 if record.lunch else 0.0)
note = fields.Text(string='备注')
state = fields.Selection([
('unconfirmed', '未确认'),
@@ -66,7 +71,6 @@ class YuthonCatering(models.Model):
"breakfast": False,
"lunch": False,
"menu_day_id": False,
"amount": 0.0,
"note": "",
})
+1 -1
View File
@@ -16,7 +16,7 @@
<field name="employee_id"/>
<field name="breakfast"/>
<field name="lunch"/>
<field name="amount"/>
<field name="amount" readonly="1"/>
<field name="menu_day_id" column_invisible="True"/>
<field name="note"/>
<button name="action_confirm" class="btn btn-primary" type="object" string="确认" />
@@ -55,11 +55,13 @@
</tr>
<tr>
<td class="header-cell"><strong>物业信息</strong></td>
<td><span t-esc="doc.property_name or ''"/></td>
<td class="header-cell"><strong>发送单位</strong></td>
<td><span t-esc="doc.approval_unit or ''"/></td>
<td colspan="3"><span t-esc="doc.property_name or ''"/></td>
</tr>
<tr>
<td class="header-cell"><strong>经办意见</strong></td>
<td colspan="3" class="attachment-list"><span t-esc="doc.handling_opinions or ''"/></td>
</tr>
<!-- 用章类型(由is_chapter控制显隐) -->
<t t-if="doc.is_chapter == 'yes'">
<tr>
@@ -72,15 +74,42 @@
</td>
</tr>
</t>
<tr>
<td class="header-cell"><strong>附件</strong></td>
<td colspan="3" class="attachment-list">
<t t-foreach="doc.property_documents_ids" t-as="doc_file">
<t t-foreach="doc.documents_ids" t-as="doc_file">
<div><span t-esc="doc_file.name or ''"/></div>
</t>
</td>
</tr>
<!-- 物业列表明细 -->
<t t-if="doc.lease_ids">
<tr>
<td colspan="4" style="background-color: #d4e6f1; text-align: center;"><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.lease_ids" t-as="line">
<tr>
<td><span t-esc="line.address_id.name or ''"/></td>
<td><span t-esc="line.property_area or ''"/></td>
<td><span t-esc="line.evaluate_unit_price or ''"/></td>
<td><span t-esc="line.message_standard_id.name or ''"/></td>
</tr>
<tr>
<td class="header-cell"><strong>税率</strong></td>
<td><span t-esc="line.tax or ''"/></td>
<td class="header-cell"><strong>管理员</strong></td>
<td><span t-esc="line.admin_line_id.name or ''"/></td>
</tr>
</t>
</t>
<!-- 审批详情 -->
<tr>