def handle(self, *args, **options): ''' :param args: :param options: :return: ''' default_fiscal_year = get_fiscal_year(date.today()) #logger.debug('Default FY %s' % default_fiscal_year) if options['fiscal_year'] is None: fiscal_year = default_fiscal_year else: fiscal_year = options['fiscal_year'] if options['create_goals']: self._create_goals_from_project_membership(fiscal_year) elif options['assign_goal']: goal_pk = int(options['goal_pk']) if options['companygroup_name'] is not None: companygroup_name = options['companygroup_name'] self._assign_goal_to_group(goal_pk, companygroup_name) if options['employees'] is not None: self._assign_goal_to_employees(goal_pk, options['employees'])
def handle(self, *args, **options): ''' :param args: :param options: :return: ''' default_fiscal_year = get_fiscal_year(date.today()) #logger.debug('Default FY %s' % default_fiscal_year) if options['fiscal_year'] is None: fiscal_year = default_fiscal_year else: fiscal_year = options['fiscal_year'] if options['create_goals']: self._create_goals_from_project_membership(fiscal_year) elif options['assign_goal']: goal_pk =int(options['goal_pk']) if options['companygroup_name'] is not None: companygroup_name = options['companygroup_name'] self._assign_goal_to_group(goal_pk, companygroup_name) if options['employees'] is not None: self._assign_goal_to_employees(goal_pk, options['employees'])
def fiscal_year(self): if self.project: return get_fiscal_year(self.project.planned_start_date) else: return get_fiscal_year(date.today())
def fiscal_year(self): return get_fiscal_year(self.planned_start_date)