Update rent_payment.py
This commit is contained in:
parent
18b89dd113
commit
4e66215abe
|
|
@ -276,8 +276,9 @@ class RentPayment(models.Model):
|
|||
all(invoice.state == 'draft' for invoice in payment.invoice_id))
|
||||
)]
|
||||
if len(rent_payment):
|
||||
raise exceptions.ValidationError(
|
||||
_("You must validate the previous rent payment and complete the process"))
|
||||
pass
|
||||
# raise exceptions.ValidationError(
|
||||
# _("You must validate the previous rent payment and complete the process"))
|
||||
if record.code == '/' or not record.code:
|
||||
code = self.env['ir.sequence'].next_by_code('rent.payment') or '/'
|
||||
record.write({'code': code})
|
||||
|
|
|
|||
Loading…
Reference in New Issue