appraial priority
This commit is contained in:
parent
811b96e852
commit
c9d960c694
|
|
@ -285,18 +285,20 @@ class StandardAppraisalLines(models.Model):
|
|||
|
||||
# inverse field
|
||||
|
||||
@api.onchange('greed', 'great_level')
|
||||
def _onchange_greed(self):
|
||||
for rec in self:
|
||||
if rec.great_level:
|
||||
value = rec.greed / (rec.great_level / 5)
|
||||
if value <= 1:
|
||||
# 3.5
|
||||
if value < 1:
|
||||
rec.priority = '0'
|
||||
elif value < 2:
|
||||
rec.priority = '1'
|
||||
elif value <= 2:
|
||||
elif value < 3:
|
||||
rec.priority = '2'
|
||||
elif value <= 3:
|
||||
elif value < 4:
|
||||
rec.priority = '3'
|
||||
elif value <= 4:
|
||||
elif value < 5:
|
||||
rec.priority = '4'
|
||||
else:
|
||||
rec.priority = '5'
|
||||
|
|
|
|||
Loading…
Reference in New Issue