Skip to content

Commit

Permalink
use X_M_Picking_Config.WEBUI_PICKINGTERMINAL_VIEWPROFILE_* instead of…
Browse files Browse the repository at this point in the history
… AD_Messages

#711
  • Loading branch information
teosarca committed Dec 3, 2017
1 parent 0b2dcff commit ae0a2aa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package de.metas.ui.web.picking;

import org.adempiere.ad.service.IADReferenceDAO;
import org.adempiere.util.Services;
import org.springframework.stereotype.Component;

import de.metas.i18n.IMsgBL;
import de.metas.i18n.ITranslatableString;
import de.metas.inoutcandidate.model.I_M_Packageable_V;
import de.metas.picking.model.X_M_Picking_Config;
import de.metas.ui.web.view.SqlViewCustomizer;
import de.metas.ui.web.view.ViewProfile;
import de.metas.ui.web.view.ViewProfileId;
Expand Down Expand Up @@ -46,14 +47,15 @@
@Component
public class PickingTerminalByOrderViewCustomizer implements SqlViewCustomizer
{
private static final ViewProfileId PROFILE_ID = ViewProfileId.fromJson("groupByOrder");
private static final ViewProfileId PROFILE_ID = ViewProfileId.fromJson(X_M_Picking_Config.WEBUI_PICKINGTERMINAL_VIEWPROFILE_GroupByOrder);
private final ViewProfile PROFILE;

private static final String FIELDNAME_OrderOrBPLocation = "OrderOrBPLocation";

public PickingTerminalByOrderViewCustomizer()
{
final ITranslatableString caption = Services.get(IMsgBL.class).getTranslatableMsgText("webui.view.pickingTerminal.profile.groupByOrder.caption");
final IADReferenceDAO referenceDAO = Services.get(IADReferenceDAO.class);
final ITranslatableString caption = referenceDAO.retrieveListNameTranslatableString(X_M_Picking_Config.WEBUI_PICKINGTERMINAL_VIEWPROFILE_AD_Reference_ID, X_M_Picking_Config.WEBUI_PICKINGTERMINAL_VIEWPROFILE_GroupByOrder);
PROFILE = ViewProfile.of(PROFILE_ID, caption);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package de.metas.ui.web.picking;

import org.adempiere.ad.service.IADReferenceDAO;
import org.adempiere.util.Services;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import de.metas.i18n.IMsgBL;
import de.metas.i18n.ITranslatableString;
import de.metas.inoutcandidate.model.I_M_Packageable_V;
import de.metas.picking.model.X_M_Picking_Config;
import de.metas.ui.web.view.SqlViewCustomizer;
import de.metas.ui.web.view.ViewProfile;
import de.metas.ui.web.view.ViewProfileId;
Expand Down Expand Up @@ -49,14 +50,15 @@
@Order(Ordered.HIGHEST_PRECEDENCE)
public class PickingTerminalByWarehouseAndProductViewCustomizer implements SqlViewCustomizer
{
private static final ViewProfileId PROFILE_ID = ViewProfileId.fromJson("groupByWarehouseAndProduct");
private static final ViewProfileId PROFILE_ID = ViewProfileId.fromJson(X_M_Picking_Config.WEBUI_PICKINGTERMINAL_VIEWPROFILE_GroupByProduct);
private final ViewProfile PROFILE;

private static final String FIELDNAME_ProductOrBPartner = "ProductOrBPartner";

public PickingTerminalByWarehouseAndProductViewCustomizer()
{
final ITranslatableString caption = Services.get(IMsgBL.class).getTranslatableMsgText("webui.view.pickingTerminal.profile.groupByWarehouseAndProduct.caption");
final IADReferenceDAO referenceDAO = Services.get(IADReferenceDAO.class);
final ITranslatableString caption = referenceDAO.retrieveListNameTranslatableString(X_M_Picking_Config.WEBUI_PICKINGTERMINAL_VIEWPROFILE_AD_Reference_ID, X_M_Picking_Config.WEBUI_PICKINGTERMINAL_VIEWPROFILE_GroupByProduct);
PROFILE = ViewProfile.of(PROFILE_ID, caption);
}

Expand Down

0 comments on commit ae0a2aa

Please sign in to comment.