工作日历设置模型新增查看日历按键,隐藏工作日历菜单
This commit is contained in:
@@ -184,6 +184,7 @@ class WorkLogSetting(models.Model):
|
||||
'name_id': self.id,
|
||||
'calendar_code': self.code,
|
||||
'date_time': single_date})
|
||||
|
||||
@staticmethod
|
||||
def daterange(start_date, end_date):
|
||||
"""
|
||||
@@ -193,6 +194,12 @@ class WorkLogSetting(models.Model):
|
||||
for n in range(int((end_date - start_date).days)):
|
||||
yield start_date + timedelta(n)
|
||||
|
||||
def open_work_schedule_calendar(self):
|
||||
action = self.env.ref('sf_plan_management.sf_work_schedule_calendar_act')
|
||||
result = action.read()[0]
|
||||
result['domain'] = [('name_id', '=', self.id)]
|
||||
return result
|
||||
|
||||
|
||||
class WorkingShift(models.Model):
|
||||
_name = 'sf.working.shift'
|
||||
|
||||
Reference in New Issue
Block a user