From c6390bfdef98a3ea94716896bc1aef183a1db813 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Sat, 23 Aug 2025 18:18:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../models/property_lease_contract.py | 22 ++++++++++++++++++ .../views/property_lease_contract.xml | 23 +++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index 88fef9498..be6789b15 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -214,6 +214,28 @@ class PropertyLeaseContract(models.Model): self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])]) title_information = fields.Text(string="产权证信息") + def action_open_contract(self): + self.ensure_one() + action = self.env["ir.actions.actions"]._for_xml_id("yuthon_property_approval.property_accounts_receivable_action") + action.update({'domain': [('contract_id', '=', self.id)]}) + return action + + def action_open_reconciliation(self): + self.ensure_one() + action = self.env["ir.actions.actions"]._for_xml_id("yuthon_property.view_property_bank_statements_action1") + action.update({'domain': [('contract_id', '=', self.id), + ('name_account', '=', self.lessee_id.name) + ] + }) + return action + + def action_open_process(self): + self.ensure_one() + action = self.env["ir.actions.actions"]._for_xml_id("soong_workflow.soong_workflow_other_record_action") + action.update({'domain': [('code', '=', self.code)]}) + return action + + @api.depends() def _compute_not_received(self): not_reconciled_records = self.env['property.accounts.receivable'].search([ diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml index 7a11b69f3..7b4948a34 100644 --- a/yuthon_property_approval/views/property_lease_contract.xml +++ b/yuthon_property_approval/views/property_lease_contract.xml @@ -420,6 +420,29 @@ string="生成管理费用" invisible="1"/> +
+ + + +