Update rent_payment.py

This commit is contained in:
zainab2097 2024-07-29 11:45:31 +03:00 committed by GitHub
parent 030295d41f
commit ad444c295d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -20,6 +20,7 @@ class RentPayment(models.Model):
code = fields.Char(string="Sequence")
name = fields.Char(string="Description")
contract_id = fields.Many2one('rental.contract', string="Rental Contract")
renter_id = fields.Many2one('res.partner',string="Renter",related='contract_id.partner_id',store=True,readonly=1)
investor_id = fields.Many2one('res.partner', string="Investor", related="contract_id.property_id.owner_id",
store=True)
partner_id = fields.Many2one('res.partner', string="Customer", related="contract_id.partner_id", store=True)