Update rental_contract.py

This commit is contained in:
zainab2097 2024-07-28 04:16:29 +03:00 committed by GitHub
parent 1c2123514c
commit f48f0b32de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -293,7 +293,10 @@ class RentalContract(models.Model):
'name': contract.name + ' - ' + contract.seq + ' - ' + str(contract.date),
'price_unit': amount,
'quantity': 1.0,
'account_id': contract.journal_id.default_account_id.id
'account_id':contract.accrued_account_id.id,
})],
'line_ids': [ (0, 0, { 'account_id': contract.accrued_account_id.id, 'debit': 0.0, 'credit': amount,'name': contract.name + ' - ' + contract.seq + ' - ' + str(contract.date), 'quantity':1}),
(0, 0, { 'account_id': contract.debit_account_id.id, 'debit': amount, 'credit': 0.0, 'quantity':1}) ]
})],
}