appraial priority mclassif
This commit is contained in:
parent
c9d960c694
commit
382c638619
|
|
@ -99,10 +99,9 @@ class EmployeeOtherRequest(models.Model):
|
|||
if not rec.attachment:
|
||||
raise exceptions.Warning(_('Please Insert dependents Attachments Files Below!'))
|
||||
|
||||
if item.request_type in ['suggestion','complaint']:
|
||||
item.state = "submit"
|
||||
else:
|
||||
item.state = "confirm"
|
||||
|
||||
item.state = "submit"
|
||||
|
||||
|
||||
|
||||
if item.request_type == 'qualification':
|
||||
|
|
@ -112,10 +111,7 @@ class EmployeeOtherRequest(models.Model):
|
|||
if not rec.attachment:
|
||||
raise exceptions.Warning(_('Please Insert Attachments Files Below!'))
|
||||
else:
|
||||
if item.request_type in ['suggestion', 'complaint']:
|
||||
item.state = "submit"
|
||||
else:
|
||||
item.state = "confirm"
|
||||
item.state = "submit"
|
||||
if item.request_type == 'certification':
|
||||
if not item.certification_employee:
|
||||
raise exceptions.Warning(_('Please The qualification or certification were not Insert Below!'))
|
||||
|
|
@ -123,10 +119,8 @@ class EmployeeOtherRequest(models.Model):
|
|||
if not rec.attachment:
|
||||
raise exceptions.Warning(_('Please Insert Attachments Files Below!'))
|
||||
else:
|
||||
if item.request_type in ['suggestion', 'complaint']:
|
||||
item.state = "submit"
|
||||
else:
|
||||
item.state = "confirm"
|
||||
item.state = "submit"
|
||||
|
||||
else:
|
||||
if item.request_type in ['suggestion', 'complaint']:
|
||||
item.state = "submit"
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@
|
|||
|
||||
<!-- <field name="classification_id" string="Classification" required="1"/>-->
|
||||
<field name="classification_id" string="التصنيف"
|
||||
attrs="{'required': [('request_type', 'in', ('suggestion','complaint'))],
|
||||
attrs="{'invisible': [('request_type', 'not in', ('suggestion','complaint'))],'required': [('request_type', 'in', ('suggestion','complaint'))],
|
||||
}"/>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -285,20 +285,18 @@ 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)
|
||||
# 3.5
|
||||
if value < 1:
|
||||
rec.priority = '0'
|
||||
elif value < 2:
|
||||
if value <= 1:
|
||||
rec.priority = '1'
|
||||
elif value < 3:
|
||||
elif value <= 2:
|
||||
rec.priority = '2'
|
||||
elif value < 4:
|
||||
elif value <= 3:
|
||||
rec.priority = '3'
|
||||
elif value < 5:
|
||||
elif value <= 4:
|
||||
rec.priority = '4'
|
||||
else:
|
||||
rec.priority = '5'
|
||||
|
|
|
|||
Loading…
Reference in New Issue