update pluggin
This commit is contained in:
parent
633a2bbb66
commit
b2f6d2bb2e
|
@ -82,6 +82,25 @@ class CompanyResourceCalendar(models.Model):
|
|||
if not existing_calender:
|
||||
Calendar.create(holiday)
|
||||
|
||||
# def action_holiday_update_timeoff_calendar(self):
|
||||
# public_holiday = []
|
||||
# holiday_id = self.env['hr.leave.type'].search([], limit=1)
|
||||
# company = self.env['res.company'].search([], limit=1)
|
||||
# employee = self.env['hr.employee'].search([], limit=1)
|
||||
# leave_calendar = self.env['hr.leave']
|
||||
# for comp_global_leave in self.company_global_leave_ids:
|
||||
# public_holiday.append({
|
||||
# 'name': "Holiday"+"/"+comp_global_leave.name,
|
||||
# 'date_from': comp_global_leave.date_from,
|
||||
# 'date_to': comp_global_leave.date_to,
|
||||
# 'holiday_status_id': holiday_id.id,
|
||||
# 'employee_id': employee.id
|
||||
# })
|
||||
# for holiday in public_holiday:
|
||||
# existing_calender = leave_calendar.search([('date_from', '=', holiday['date_from'])])
|
||||
# if not existing_calender:
|
||||
# leave_calendar.create(holiday)
|
||||
|
||||
|
||||
class CompanyResourceCalendarLeaves(models.Model):
|
||||
_name = 'company.resource.calendar.leaves'
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
<header>
|
||||
<button name="action_public_holiday_send" string="Send by Email" type="object" class="btn-primary"/>
|
||||
<button name="action_holiday_update_calendar" string="Update Holiday Calendar" type="object" class="btn-primary"/>
|
||||
<!--<button name="action_holiday_update_timeoff_calendar" string="Update Holiday Calendar" type="object" class="btn-primary"/>-->
|
||||
</header>
|
||||
<sheet>
|
||||
<group>
|
||||
|
|
Loading…
Reference in New Issue