diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index b783406c7..441fbc1c4 100644 --- a/yuthon_property_approval/models/inherit_yuthon_property.py +++ b/yuthon_property_approval/models/inherit_yuthon_property.py @@ -61,6 +61,8 @@ class PropertyBankStatements(models.Model): ('is_reconciliation', '=', True) ]) rec.bank_state = 'not_reconciled' + rec.no_amount = rec.yes_amount + rec.yes_amount = 0 if accounts: for account in accounts: account.write({'is_reconciliation': False, diff --git a/yuthon_property_approval/wizard/property_reconciliation_wizard.py b/yuthon_property_approval/wizard/property_reconciliation_wizard.py index 8f1bf00e8..1a285b7a6 100644 --- a/yuthon_property_approval/wizard/property_reconciliation_wizard.py +++ b/yuthon_property_approval/wizard/property_reconciliation_wizard.py @@ -152,9 +152,10 @@ class PropertyReconciliationWizard(models.Model): ('contract_id', '=', line.contract_id.id), ('collection_type', '=', 'rent'), ] + is_reconciliation = line.amount reconciliation_id = self.env['property.reconciliation.line'].search(domain2, limit=1) self.env['property.accounts.receivable'].create({ - 'is_reconciliation': True, + 'is_reconciliation': is_reconciliation, 'due_date': line.due_date, 'penalty': reconciliation_id.rent, 'management_type_id': management_type_id.id,