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"/> +
+ + + +