Search in sources :

Example 1 with CustomsCodeNomenclature

use of com.axelor.apps.stock.db.CustomsCodeNomenclature in project axelor-open-suite by axelor.

the class StockMoveLineServiceImpl method storeCustomsCodes.

@Override
public void storeCustomsCodes(List<StockMoveLine> stockMoveLineList) {
    if (stockMoveLineList == null) {
        return;
    }
    for (StockMoveLine stockMoveLine : stockMoveLineList) {
        Product product = stockMoveLine.getProduct();
        CustomsCodeNomenclature customsCodeNomenclature = product != null ? product.getCustomsCodeNomenclature() : null;
        stockMoveLine.setCustomsCodeNomenclature(customsCodeNomenclature);
        stockMoveLine.setCustomsCode(customsCodeNomenclature != null ? customsCodeNomenclature.getCode() : null);
    }
}
Also used : CustomsCodeNomenclature(com.axelor.apps.stock.db.CustomsCodeNomenclature) StockMoveLine(com.axelor.apps.stock.db.StockMoveLine) Product(com.axelor.apps.base.db.Product)

Aggregations

Product (com.axelor.apps.base.db.Product)1 CustomsCodeNomenclature (com.axelor.apps.stock.db.CustomsCodeNomenclature)1 StockMoveLine (com.axelor.apps.stock.db.StockMoveLine)1