Merge pull request #619 from expsa/last

Update rental_contract.py
This commit is contained in:
zainab2097 2024-08-08 17:31:48 +03:00 committed by GitHub
commit 99cc7817d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 5 deletions

View File

@ -348,12 +348,14 @@ class RentalContract(models.Model):
raise exceptions.ValidationError(
_("Rent payment %s is not equal the rent total amount %s ") % (rent_payment, total_rent))
if total_service != service_payment:
raise exceptions.ValidationError(
_("Service payment %s is not equal the rent total service amount %s ") % (
service_payment, total_service))
pass
# raise exceptions.ValidationError(
# _("Service payment %s is not equal the rent total service amount %s ") % (
# service_payment, total_service))
if total_water != water_payment:
raise exceptions.ValidationError(
_("Water cost to pay %s is not equal the rent total water cost %s ") % (water_payment, total_water))
pass
# raise exceptions.ValidationError(
# _("Water cost to pay %s is not equal the rent total water cost %s ") % (water_payment, total_water))
self.write({'state': 'review'})
def action_submit(self):