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 @@