Merge pull request #414 from expsa/zainab1

Zainab1
This commit is contained in:
zainab2097 2024-07-29 11:47:57 +03:00 committed by GitHub
commit dc1a855c89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 1 deletions

View File

@ -1989,3 +1989,8 @@ msgstr "العقد الإيجاري"
msgid "Rent"
msgstr "ايجار"
#. module: property_management
#: model:ir.model.fields,field_description:property_management.field_rent_payment__renter_id
msgid "Renter"
msgstr "المستأجر"

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)

View File

@ -24,6 +24,7 @@
<group>
<group string="Contract Details">
<field name="contract_id" readonly="1"/>
<field name="renter_id"/>
<field name="property_id" readonly="1"/>
<field name="unit_ids" widget="many2many_tags" readonly="1"/>
<field name="due_date" readonly="1"/>
@ -69,6 +70,7 @@
<field name="name"/>
<field name="code"/>
<field name="contract_id"/>
<field name="renter_id"/>
<field name="property_id"/>
<field name="due_date"/>
<field name="paid_date"/>
@ -115,4 +117,4 @@
</data>
</odoo>
</odoo>