@@ -70,11 +70,15 @@ class ProcessingOrderApproval(models.Model):
|
||||
|
||||
@api.depends('property_id')
|
||||
def _compute_contract_id(self):
|
||||
if self.property_id:
|
||||
contract_id = self.env["property.lease.contract.line"].search([('address_id', '=', self.property_id.id)], limit=1)
|
||||
else:
|
||||
contract_id = False
|
||||
self.contract_id = contract_id.lease_id.id
|
||||
for record in self:
|
||||
if record.property_id:
|
||||
contract_id = self.env["property.lease.contract.line"].search(
|
||||
[('address_id', '=', record.property_id.id)],
|
||||
limit=1
|
||||
)
|
||||
else:
|
||||
contract_id = False
|
||||
record.contract_id = contract_id.lease_id.id if contract_id else False
|
||||
|
||||
@api.depends("company_id")
|
||||
def _compute_name(self):
|
||||
|
||||
Reference in New Issue
Block a user