Merge pull request #3589 from expsa/attendence_total_hour

appraial priority mclassif
This commit is contained in:
eslamtalaat744 2025-06-23 16:03:13 +03:00 committed by GitHub
commit 67be6cafa1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -263,7 +263,7 @@ class StandardAppraisalLines(models.Model):
question = fields.Char()
great_level = fields.Float()
priority = fields.Selection(
[
[('0', '0'),
('1', '1'),
('2', '2'),
('3', '3'),
@ -301,12 +301,17 @@ class StandardAppraisalLines(models.Model):
rec.priority = '0' # fallback
else:
rec.priority = '0'
print("lllll")
print(rec.priority)
@api.onchange('priority')
def _inverse_priority(self):
for rec in self:
if rec.great_level and rec.priority:
# 3*2
# 2*4
print("kkkkkkkkk")
print(int(rec.priority) * (rec.great_level / 5))
rec.greed = int(rec.priority) * (rec.great_level / 5)
@api.constrains('greed', 'great_level')