Merge pull request #1037 from expsa/property_security
Update rent_payment.py
This commit is contained in:
commit
5831e50f0a
|
|
@ -215,7 +215,7 @@ class RentPayment(models.Model):
|
||||||
if not vendor_id or not account_id:
|
if not vendor_id or not account_id:
|
||||||
raise UserError(_("Vendor or Account not configured properly in settings."))
|
raise UserError(_("Vendor or Account not configured properly in settings."))
|
||||||
|
|
||||||
# if payments_to_invoice:
|
if payments_to_invoice:
|
||||||
vendor_bill = self.env['account.move'].create({
|
vendor_bill = self.env['account.move'].create({
|
||||||
'move_type': 'in_invoice',
|
'move_type': 'in_invoice',
|
||||||
'invoice_date': today_date, # Set the invoice date,
|
'invoice_date': today_date, # Set the invoice date,
|
||||||
|
|
@ -227,9 +227,6 @@ class RentPayment(models.Model):
|
||||||
'account_id': account_id
|
'account_id': account_id
|
||||||
})],
|
})],
|
||||||
})
|
})
|
||||||
# else:
|
|
||||||
# raise UserError(_("No eligible payments selected. there are payment not valid conditions"))
|
|
||||||
|
|
||||||
for payment in payments_to_invoice:
|
for payment in payments_to_invoice:
|
||||||
payment.invoice_commission_id = vendor_bill.id
|
payment.invoice_commission_id = vendor_bill.id
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue