IDEMPIERE-4990 Inconsistent product attribute order (#912)
This commit is contained in:
parent
12c7c20c23
commit
21f022f2af
|
@ -46,7 +46,10 @@ public class WInfoPAttributeEditor extends WEditor implements IWhereClauseEditor
|
||||||
this.ctx = ctx;
|
this.ctx = ctx;
|
||||||
this.windowNo = windowNo;
|
this.windowNo = windowNo;
|
||||||
getComponent().addEventListener(Events.ON_CLICK, this);
|
getComponent().addEventListener(Events.ON_CLICK, this);
|
||||||
getComponent().setImage(ThemeManager.getThemeResource("images/PAttribute16.png"));
|
if (ThemeManager.isUseFontIconForImage())
|
||||||
|
getComponent().setIconSclass("z-icon-PAttribute");
|
||||||
|
else
|
||||||
|
getComponent().setImage(ThemeManager.getThemeResource("images/PAttribute16.png"));
|
||||||
getComponent().setTooltiptext(Msg.getMsg(Env.getCtx(), "PAttribute"));
|
getComponent().setTooltiptext(Msg.getMsg(Env.getCtx(), "PAttribute"));
|
||||||
setReadWrite(false);
|
setReadWrite(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -232,18 +232,20 @@ public class InfoPAttributePanel extends Window implements EventListener<Event>
|
||||||
{
|
{
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
String whereAttributeSet;
|
String joinAttributeSet;
|
||||||
if (p_M_AttributeSet_ID > 0)
|
if (p_M_AttributeSet_ID > 0)
|
||||||
whereAttributeSet = "AND M_Attribute_ID IN (SELECT M_Attribute_ID FROM M_AttributeUse WHERE M_AttributeSet_ID="+p_M_AttributeSet_ID+")";
|
joinAttributeSet = "JOIN M_AttributeUse mau ON (a.M_Attribute_ID = mau.M_Attribute_ID AND mau.M_AttributeSet_ID="+p_M_AttributeSet_ID+")";
|
||||||
else
|
else
|
||||||
whereAttributeSet = "";
|
joinAttributeSet = "";
|
||||||
String sql = MRole.getDefault().addAccessSQL(
|
String sql = MRole.getDefault().addAccessSQL(
|
||||||
"SELECT M_Attribute_ID, Name, Description, AttributeValueType, IsInstanceAttribute "
|
"SELECT a.M_Attribute_ID, a.Name, a.Description, a.AttributeValueType, a.IsInstanceAttribute "
|
||||||
+ "FROM M_Attribute "
|
+ "FROM M_Attribute a "
|
||||||
+ "WHERE IsActive='Y' "
|
+ joinAttributeSet
|
||||||
+ whereAttributeSet
|
+ " WHERE a.IsActive='Y' "
|
||||||
+ " ORDER BY IsInstanceAttribute, Name",
|
+ " ORDER BY "
|
||||||
"M_Attribute", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO);
|
+ (p_M_AttributeSet_ID > 0 ? "mau.SeqNo, " : "")
|
||||||
|
+ "a.IsInstanceAttribute, a.Name",
|
||||||
|
"a", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
|
||||||
boolean instanceLine = false;
|
boolean instanceLine = false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue