fix bug in contract
This commit is contained in:
parent
f5e05cb9f3
commit
53f9e909d1
|
|
@ -100,7 +100,7 @@ class AnnualRaise(models.Model):
|
|||
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'):
|
||||
if not self._context.get('contract_id') and rec.contract_id:
|
||||
contract_object = self.env['rental.contract'].search([('id', '=', rec.contract_id.id)])
|
||||
date = contract_object.date_from
|
||||
rec.due_date_raise = date
|
||||
|
|
|
|||
Loading…
Reference in New Issue