Merge pull request !5489 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2025-09-29 10:54:30 +00:00
committed by Gitee
5 changed files with 119 additions and 5 deletions
@@ -11,7 +11,7 @@
<field name="original_amount"/>
<field name="yes_amount" string="已对账"/>
<field name="no_amount"/>
<field name="property_ids" widget="many2many_tags"/>
<field name="property_ids" widget="many2many_tags" column_invisible="1"/>
<field name="bank_state" />
</tree>
</field>
@@ -43,9 +43,24 @@ class PropertyBankStatements(models.Model):
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
contract_ids = fields.Many2many('property.lease.contract', string="租赁合同审批")
property_name = fields.Char(string="物业名称")
property_name = fields.Text(string="物业名称", compute="compute_property_name", store=True)
accounts_id = fields.Many2one('property.accounts.approval', string="关联生成应收审批单")
def update_property_name(self):
property_ids = self.env["property.bank.statements"].browse(
self._context.get('active_ids', self._context.get('active_id')))
for rec in property_ids:
rec.compute_property_name()
@api.depends('contract_ids')
def compute_property_name(self):
for rec in self:
rec.property_name = ""
if rec.contract_ids:
for contract in rec.contract_ids:
if contract.property_name:
rec.property_name += contract.property_name + "\n"
def batch_revocation(self):
bank_ids = self.env["property.bank.statements"].browse(
self._context.get('active_ids', self._context.get('active_id')))
@@ -91,7 +91,94 @@
<td width="35%"><span t-field="o.term_end_time"/></td>
</tr>
</table>
<table width="100%" style="table-layout:fixed; margin-top:15px;">
<tr>
<td width="15%"><strong>证照:</strong></td>
<td width="35%" class="attachment-names">
<t t-if="o.license_ids">
<t t-foreach="o.license_ids" t-as="license">
<span t-field="license.name"/><br/>
</t>
</t>
<span t-if="not o.license_ids">无</span>
</td>
<td width="15%"><strong>授权委托书:</strong></td>
<td width="35%" class="attachment-names">
<t t-if="o.power_attorney_ids">
<t t-foreach="o.power_attorney_ids" t-as="power">
<span t-field="power.name"/><br/>
</t>
</t>
<span t-if="not o.power_attorney_ids">无</span>
</td>
</tr>
</table>
<table width="100%" style="table-layout:fixed;">
<tr>
<td width="15%"><strong>资产评估结果明细表:</strong></td>
<td width="35%" class="attachment-names">
<t t-if="o.asset_valuation_ids">
<t t-foreach="o.asset_valuation_ids" t-as="valuation">
<span t-field="valuation.name"/><br/>
</t>
</t>
<span t-if="not o.asset_valuation_ids">无</span>
</td>
<td width="15%"><strong>合同/协议:</strong></td>
<td width="35%" class="attachment-names">
<t t-if="o.lease_contract">
<t t-foreach="o.lease_contract" t-as="contract_file">
<span t-field="contract_file.name"/><br/>
</t>
</t>
<span t-if="not o.lease_contract">无</span>
</td>
</tr>
</table>
<table width="100%" style="table-layout:fixed;">
<tr>
<td width="15%"><strong>成交确认书:</strong></td>
<td width="35%" class="attachment-names">
<t t-if="o.confirmation_transaction_ids">
<t t-foreach="o.confirmation_transaction_ids" t-as="confirmation">
<span t-field="confirmation.name"/><br/>
</t>
</t>
<span t-if="not o.confirmation_transaction_ids">无</span>
</td>
<td width="15%"><strong>合同签名附件:</strong></td>
<td width="35%" class="attachment-names">
<t t-if="o.contract_signature_ids">
<t t-foreach="o.contract_signature_ids" t-as="signature">
<span t-field="signature.name"/><br/>
</t>
</t>
<span t-if="not o.contract_signature_ids">无</span>
</td>
</tr>
</table>
<table width="100%" style="table-layout:fixed;">
<tr>
<td width="15%"><strong>安全生产责任书(住宅):</strong></td>
<td width="35%" class="attachment-names">
<t t-if="o.responsibility_book_ids">
<t t-foreach="o.responsibility_book_ids" t-as="responsibility">
<span t-field="responsibility.name"/><br/>
</t>
</t>
<span t-if="not o.responsibility_book_ids">无</span>
</td>
<td width="15%"><strong>其他:</strong></td>
<td width="35%" class="attachment-names">
<t t-if="o.other_ment_ids">
<t t-foreach="o.other_ment_ids" t-as="other">
<span t-field="other.name"/><br/>
</t>
</t>
<span t-if="not o.other_ment_ids">无</span>
</td>
</tr>
</table>
<!-- 审批明细 -->
<t t-if="o.log_ids">
<table width="100%" style="table-layout:fixed;">
@@ -317,7 +317,7 @@
filter_domain="['|', '|', ('property_ids.name', 'ilike', self), ('lessee_id.name', 'ilike', self), ('contract_id.contract_code', 'ilike', self), ('company_id.name', 'ilike', self)]"/>
<field name="property_ids"/>
<field name="lessee_id"/>
<field name="contract_id"/>
<field name="contract_id" string="合同"/>
<field name="company_id"/>
<field name="original_amount"/>
<group expand="0" string="group_by">
@@ -526,6 +526,7 @@
</xpath>
<xpath expr="//field[@name='property_ids']" position="before">
<field name="contract_ids" string="合同编号" widget="many2many_tags" readonly="1" domain="[('lessor_id.name', '=', your_own_unit)]"/>
<field name="property_name" string="物业信息"/>
</xpath>
<xpath expr="//field[@name='bank_state']" position="after">
<button name="button_reconciliation" type="object" string="对账" class="btn btn-primary" invisible="bank_state != 'not_reconciled'"/>
@@ -543,6 +544,17 @@
</xpath>
</field>
</record>
<record id="inherit_property_bank_statements_search" model="ir.ui.view">
<field name="name">property.bank.statements.search</field>
<field name="model">property.bank.statements</field>
<field name="inherit_id" ref="yuthon_property.view_property_bank_statements_search"/>
<field name="arch" type="xml">
<xpath expr="//filter[@name='original_amount']" position="after">
<field name="contract_ids"/>
<field name="property_name" string="物业信息"/>
</xpath>
</field>
</record>
<record id="all_batch_revocation" model="ir.actions.server">
<field name="name">批量撤销</field>
<field name="model_id" ref="yuthon_property.model_property_bank_statements"/>
@@ -298,7 +298,7 @@ class SalaryComputeWizard(models.Model):
elif field_name == 'union_dues': # 单独处理工会会费
base_salary = getattr(internship_id, 'base_salary', 0)
result = base_salary * 0.005
result = abs(base_salary * 0.005) * -1
elif field_name == 'housing_provident_fund': # 单独处理住房公积金
# 获取合同入职日期的年份和月份
contract_year = str(contract_start_date.year)