Search in sources :

Example 6 with MoveTemplate

use of com.axelor.apps.account.db.MoveTemplate in project axelor-open-suite by axelor.

the class ImportMoveTemplate method isValid.

@Transactional(rollbackOn = Exception.class)
public Object isValid(Object bean, Map<String, Object> values) throws AxelorException {
    assert bean instanceof MoveTemplate;
    MoveTemplate moveTemplate = (MoveTemplate) bean;
    moveTemplate.setIsValid(moveTemplateService.checkValidity(moveTemplate));
    moveTemplateRepository.save(moveTemplate);
    return moveTemplate;
}
Also used : MoveTemplate(com.axelor.apps.account.db.MoveTemplate) Transactional(com.google.inject.persist.Transactional)

Aggregations

MoveTemplate (com.axelor.apps.account.db.MoveTemplate)6 MoveTemplateService (com.axelor.apps.account.service.move.MoveTemplateService)3 Move (com.axelor.apps.account.db.Move)2 Transactional (com.google.inject.persist.Transactional)2 MoveLine (com.axelor.apps.account.db.MoveLine)1 MoveTemplateLine (com.axelor.apps.account.db.MoveTemplateLine)1 MoveTemplateType (com.axelor.apps.account.db.MoveTemplateType)1 Tax (com.axelor.apps.account.db.Tax)1 TaxLine (com.axelor.apps.account.db.TaxLine)1 MoveTemplateTypeRepository (com.axelor.apps.account.db.repo.MoveTemplateTypeRepository)1 AppBaseService (com.axelor.apps.base.service.app.AppBaseService)1 AxelorException (com.axelor.exception.AxelorException)1 Context (com.axelor.rpc.Context)1 IOException (java.io.IOException)1 BigDecimal (java.math.BigDecimal)1 LocalDate (java.time.LocalDate)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1