fix bug in contract

This commit is contained in:
esraa 2024-10-30 15:46:04 +03:00
parent f0894b267d
commit 19bb9f8734
1 changed files with 2 additions and 2 deletions

View File

@ -94,8 +94,8 @@ class AnnualRaise(models.Model):
@api.depends('year', 'contract_id')
def get_due_date(self):
if self._context.get('contract_id'):
contract_object = self.env['rental.contract'].search([('id', '=',self._context.get('contract_id') )])
# if self._context.get('contract_id'):
# contract_object = self.env['rental.contract'].search([('id', '=',self._context.get('contract_id') )])
for rec in self:
if not self._context.get('contract_id'):
contract_object = self.env['rental.contract'].search([('id', '=', rec.contract_id.id)])