From df6a29ac2a9d5c9af9a6d69666954bed13f99bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Tue, 16 Jun 2026 11:31:51 +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 --- yuthon_property_approval/__manifest__.py | 1 + .../models/property_lease_contract.py | 15 +++++++++++++++ .../security/ir.model.access.csv | 3 ++- .../views/property_lease_contract.xml | 2 ++ yuthon_property_approval/wizard/__init__.py | 3 ++- 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/yuthon_property_approval/__manifest__.py b/yuthon_property_approval/__manifest__.py index 60447fd0d..4bea54a1c 100644 --- a/yuthon_property_approval/__manifest__.py +++ b/yuthon_property_approval/__manifest__.py @@ -110,6 +110,7 @@ 'wizard/property_bills_wizard_views.xml', 'wizard/property_meeting_wizard_views.xml', 'wizard/property_deposit_wizard_views.xml', + 'wizard/contract_rental_wizard_views.xml', 'data/receivable_modify_line_group_data.xml', 'views/property_menu_all.xml', 'report/property_lease_contract_print_report.xml', diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index 5f4d9d104..e38895f93 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -1386,6 +1386,21 @@ class PropertyLeaseContract(models.Model): } } + def action_open_contract_rental_wizard(self): + """指定合同生成租金弹窗""" + property_ids = self.env["property.lease.contract"].browse( + self._context.get('active_ids', self._context.get('active_id'))) + return { + 'name': '生成租金', + 'type': 'ir.actions.act_window', + 'view_mode': 'form', + 'res_model': 'property.contract.rental.wizard', + 'target': 'new', + 'context': { + 'default_contract_ids': property_ids.ids, + }, + } + def action_generate_administrative_expenses(self): """ diff --git a/yuthon_property_approval/security/ir.model.access.csv b/yuthon_property_approval/security/ir.model.access.csv index 278bc8e7c..44684b12c 100644 --- a/yuthon_property_approval/security/ir.model.access.csv +++ b/yuthon_property_approval/security/ir.model.access.csv @@ -142,4 +142,5 @@ access_property_fee_form_line,property_fee_form_line,model_property_fee_form_lin access_refund_wizard,refund_wizard,model_refund_wizard,base.group_user,1,1,1,1 access_refund_wizard_line,refund_wizard_line,model_refund_wizard_line,base.group_user,1,1,1,1 access_property_business_type,property_business_type,model_property_business_type,base.group_user,1,1,1,1 -access_property_payment_type,property_payment_type,model_property_payment_type,base.group_user,1,1,1,1 \ No newline at end of file +access_property_payment_type,property_payment_type,model_property_payment_type,base.group_user,1,1,1,1 +access_property_contract_rental_wizard,property_contract_rental_wizard,model_property_contract_rental_wizard,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml index 6c17b8181..6c6b244fa 100644 --- a/yuthon_property_approval/views/property_lease_contract.xml +++ b/yuthon_property_approval/views/property_lease_contract.xml @@ -423,6 +423,8 @@