diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index 73d06834e..6ae1e33a6 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -711,9 +711,8 @@ class PropertyLeaseContract(models.Model): def _compute_reconciliation_count(self): for record in self: - record.reconciliation_count = self.env['property.bank.statements'].search_count([('contract_id', '=', record.id), - ('name_account', '=', record.lessee_id.name) - ]) + record.reconciliation_count = self.env['receivable.modify.line'].search_count([('receivable_id.contract_id', '=', self.id)]) + def _compute_process_count(self): for record in self: record.process_count = self.env['soong.workflow.record'].search_count([('code', '=', record.code)]) @@ -732,9 +731,8 @@ class PropertyLeaseContract(models.Model): 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) + action = self.env["ir.actions.actions"]._for_xml_id("yuthon_work_brand.action_receivable_modify_line_wbrand") + action.update({'domain': [('receivable_id.contract_id', '=', self.id), ] }) return action diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml index 85d24733b..1d597f282 100644 --- a/yuthon_property_approval/views/property_lease_contract.xml +++ b/yuthon_property_approval/views/property_lease_contract.xml @@ -336,7 +336,7 @@ - + @@ -844,7 +844,7 @@ - +