diff --git a/odex25_realstate/property_management/models/rental_contract.py b/odex25_realstate/property_management/models/rental_contract.py index bad15c483..025b0cb5d 100644 --- a/odex25_realstate/property_management/models/rental_contract.py +++ b/odex25_realstate/property_management/models/rental_contract.py @@ -78,6 +78,12 @@ class RentalContract(models.Model): if record.state == 'renewed': record.is_today_end_date = False + @api.onchange('unit_ids') + def get_units_accounts(self): + self.journal_id = self.unit_ids.journal_id + self.debit_account_id = self.unit_ids.debit_account_id + self.accrued_account_id = self.unit_ids.accrued_account_id + self.revenue_account_id = self.unit_ids.revenue_account_id @api.onchange('rent_method') def onchange_rent_method(self): diff --git a/odex25_realstate/real_estate/i18n/ar_001.po b/odex25_realstate/real_estate/i18n/ar_001.po index ac44c5ca8..b9172017c 100644 --- a/odex25_realstate/real_estate/i18n/ar_001.po +++ b/odex25_realstate/real_estate/i18n/ar_001.po @@ -90,6 +90,22 @@ msgstr "" " - + - + @@ -161,6 +161,18 @@ + + + + + + + + + + +