Search in sources :

Example 16 with HRConfig

use of com.axelor.apps.hr.db.HRConfig in project axelor-open-suite by axelor.

the class AppHumanResourceServiceImpl method generateHrConfigurations.

@Override
@Transactional
public void generateHrConfigurations() {
    List<Company> companies = companyRepo.all().filter("self.hrConfig is null").fetch();
    for (Company company : companies) {
        HRConfig hrConfig = new HRConfig();
        hrConfig.setCompany(company);
        hrConfigRepo.save(hrConfig);
    }
}
Also used : Company(com.axelor.apps.base.db.Company) HRConfig(com.axelor.apps.hr.db.HRConfig) Transactional(com.google.inject.persist.Transactional)

Aggregations

HRConfig (com.axelor.apps.hr.db.HRConfig)16 Transactional (com.google.inject.persist.Transactional)8 Company (com.axelor.apps.base.db.Company)5 Template (com.axelor.apps.message.db.Template)4 BigDecimal (java.math.BigDecimal)4 EventsPlanning (com.axelor.apps.base.db.EventsPlanning)3 Employee (com.axelor.apps.hr.db.Employee)3 HRConfigService (com.axelor.apps.hr.service.config.HRConfigService)3 Product (com.axelor.apps.base.db.Product)2 WeeklyPlanning (com.axelor.apps.base.db.WeeklyPlanning)2 PayrollLeave (com.axelor.apps.hr.db.PayrollLeave)2 User (com.axelor.auth.db.User)2 AxelorException (com.axelor.exception.AxelorException)2 LocalDate (java.time.LocalDate)2 AppBase (com.axelor.apps.base.db.AppBase)1 AppLeave (com.axelor.apps.base.db.AppLeave)1 AppTimesheet (com.axelor.apps.base.db.AppTimesheet)1 PriceList (com.axelor.apps.base.db.PriceList)1 Sequence (com.axelor.apps.base.db.Sequence)1 PublicHolidayService (com.axelor.apps.base.service.publicHoliday.PublicHolidayService)1