Update rent_payment.py
This commit is contained in:
parent
69fac13684
commit
ffdc160231
|
|
@ -59,7 +59,7 @@ class RentPayment(models.Model):
|
|||
if rec.contract_id:
|
||||
rec.renter_id = rec.contract_id.partner_id.id
|
||||
@api.depends('invoice_id')
|
||||
def _compute_renter(self):
|
||||
def _compute_payment(self):
|
||||
for rec in self:
|
||||
if rec.invoice_id and rec.invoice_id.payment_state in ['paid', 'in_payment']:
|
||||
rec.write({'state': 'paid','paid_date':rec.invoice_id.payment_id.date})
|
||||
|
|
|
|||
Loading…
Reference in New Issue