Update letter.py

This commit is contained in:
zainab2097 2024-08-01 13:00:36 +03:00 committed by GitHub
parent 7dcbbccf7b
commit 35704cecef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ class Letters(models.Model):
def compute_img(self):
employee_id = self.env['hr.employee'].search([('user_id', '=', self.env.uid)], limit=1)
if employee_id:
entity = self.env['cm.entity'].search([('type','=','employee'),('employee_id', '=',employee_id)], limit=1)
entity = self.env['cm.entity'].search([('type','=','employee'),('employee_id', '=',employee_id.id)], limit=1)
for rec in self:
rec.signature = entity.image