添加功能
This commit is contained in:
@@ -126,10 +126,10 @@ class HrAttendance(models.Model):
|
||||
|
||||
def button_card_approval(self):
|
||||
form_id = self.env.ref('yuthon_hr_attendance.card_approval_form').id
|
||||
# if self.is_approval:
|
||||
# raise ValidationError("该补卡已提交申请!")
|
||||
# else:
|
||||
# self.is_approval = True
|
||||
if self.is_approval:
|
||||
raise ValidationError("该补卡已提交申请!")
|
||||
else:
|
||||
self.is_approval = True
|
||||
return {
|
||||
"type": "ir.actions.act_window",
|
||||
"name": "补卡申请",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<field name="week" optional="show"/>
|
||||
<field name="abnormal" optional="show" column_invisible="1"/>
|
||||
<field name="work_time_type" optional="hidden"/>
|
||||
<field name="is_approval" column_invisible="1"/>
|
||||
<field name="is_approval" optional="hidden"/>
|
||||
<field name="is_abnormal" optional="show" class="list_width"/>
|
||||
<field name="absenteeism_card" optional="show" class="list_width"/>
|
||||
<button name="button_leave" type="object" string="请假" class="oe_highlight"
|
||||
|
||||
Reference in New Issue
Block a user