Merged release-1.0c into release-2.0

This commit is contained in:
Heng Sin Low 2013-12-04 18:30:46 +08:00
commit fe399974ea
5 changed files with 84 additions and 27 deletions

View File

@ -0,0 +1,22 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Dec 4, 2013 2:25:37 PM SGT
-- IDEMPIERE-362 Hide things that don't work on iDempiere
UPDATE AD_Field SET IsActive='N',Updated=TO_DATE('2013-12-04 14:25:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3853
;
-- Dec 4, 2013 2:26:09 PM SGT
UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2013-12-04 14:26:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=4872
;
-- Dec 4, 2013 2:27:39 PM SGT
UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2013-12-04 14:27:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=4997
;
-- Dec 4, 2013 2:27:42 PM SGT
UPDATE AD_Field SET IsActive='N',Updated=TO_DATE('2013-12-04 14:27:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3927
;
SELECT register_migration_script('201312041431_IDEMPIERE-362.sql') FROM dual
;

View File

@ -0,0 +1,19 @@
-- Dec 4, 2013 2:25:37 PM SGT
-- IDEMPIERE-362 Hide things that don't work on iDempiere
UPDATE AD_Field SET IsActive='N',Updated=TO_TIMESTAMP('2013-12-04 14:25:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3853
;
-- Dec 4, 2013 2:26:09 PM SGT
UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2013-12-04 14:26:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=4872
;
-- Dec 4, 2013 2:27:39 PM SGT
UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2013-12-04 14:27:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=4997
;
-- Dec 4, 2013 2:27:42 PM SGT
UPDATE AD_Field SET IsActive='N',Updated=TO_TIMESTAMP('2013-12-04 14:27:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3927
;
SELECT register_migration_script('201312041431_IDEMPIERE-362.sql') FROM dual
;

View File

@ -121,24 +121,6 @@ public class InfoProductWindow extends InfoWindow {
}
where.append("p.IsSummary='N' ");
}
for(WEditor editor : editors) {
if (editor.getGridField() != null && editor.getGridField().getColumnName().equals("C_BPartner_ID")) {
Number value = (Number) editor.getValue();
if (value == null || value.intValue() == 0)
{
if (where.length() > 0) {
where.append(" AND ");
}
where.append("CASE WHEN ppo.m_product_id > 0 THEN ppo.C_BPartner_ID IN (");
where.append("SELECT MAX(ppo.C_BPartner_ID) FROM M_Product_PO ppo ");
where.append("WHERE p.M_Product_ID=ppo.M_Product_ID AND ppo.IsCurrentVendor='Y' AND ppo.IsActive='Y') ");
where.append("ELSE 1 = 1 END ");
}
break;
}
}
return where.toString();
}

View File

@ -75,6 +75,7 @@ import org.zkoss.zk.ui.Page;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.event.SelectEvent;
import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zul.Listhead;
import org.zkoss.zul.Listheader;
@ -388,6 +389,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
private int cacheEnd;
private boolean m_useDatabasePaging = false;
private BusyDialog progressWindow;
private Listitem m_lastOnSelectItem;
private static final String[] lISTENER_EVENTS = {};
@ -740,6 +742,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
return;
}
contentPanel.addEventListener(Events.ON_DOUBLE_CLICK, this);
contentPanel.addEventListener(Events.ON_SELECT, this);
}
protected void insertPagingComponent() {
@ -1124,8 +1127,19 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
{
onOk();
}
else if (event.getTarget() == contentPanel && event.getName().equals(Events.ON_SELECT))
{
m_lastOnSelectItem = null;
SelectEvent<?, ?> selectEvent = (SelectEvent<?, ?>) event;
if (selectEvent.getReference() != null && selectEvent.getReference() instanceof Listitem)
m_lastOnSelectItem = (Listitem) selectEvent.getReference();
}
else if (event.getTarget() == contentPanel && event.getName().equals(Events.ON_DOUBLE_CLICK))
{
if (contentPanel.isMultiple()) {
if (m_lastOnSelectItem != null)
contentPanel.setSelectedItem(m_lastOnSelectItem);
}
onDoubleClick();
}
else if (event.getTarget().equals(confirmPanel.getButton(ConfirmPanel.A_REFRESH)))

View File

@ -20,6 +20,7 @@ import org.adempiere.process.IPrintShippingLabel;
import org.adempiere.webui.FedexLabelWindow;
import org.adempiere.webui.LabelAppletWindow;
import org.adempiere.webui.UPSHtmlLabelWindow;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.session.SessionManager;
import org.compiere.model.MAttachment;
@ -46,9 +47,15 @@ public class DefaultPrintShippingLabel implements IPrintShippingLabel
}
if (list.size() > 0)
{
LabelAppletWindow law = new LabelAppletWindow(list);
law.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
SessionManager.getAppDesktop().showWindow(law);
final List<byte[]> dataList = list;
AEnv.executeAsyncDesktopTask(new Runnable() {
@Override
public void run() {
LabelAppletWindow law = new LabelAppletWindow(dataList);
law.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
SessionManager.getAppDesktop().showWindow(law);
}
});
}
}
return list.size() + " labels loaded.";
@ -70,15 +77,28 @@ public class DefaultPrintShippingLabel implements IPrintShippingLabel
}
if (htmls.size() > 0)
{
Window labelWindow = new UPSHtmlLabelWindow(htmls, images);
labelWindow.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
SessionManager.getAppDesktop().showWindow(labelWindow);
final List<MAttachmentEntry> htmlList = htmls;
final List<MAttachmentEntry> imageList = images;
AEnv.executeAsyncDesktopTask(new Runnable() {
@Override
public void run() {
Window labelWindow = new UPSHtmlLabelWindow(htmlList, imageList);
labelWindow.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
SessionManager.getAppDesktop().showWindow(labelWindow);
}
});
}
else if(images.size() > 0)
{
Window labelWindow = new FedexLabelWindow(images);
labelWindow.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
SessionManager.getAppDesktop().showWindow(labelWindow);
final List<MAttachmentEntry> imageList = images;
AEnv.executeAsyncDesktopTask(new Runnable() {
@Override
public void run() {
Window labelWindow = new FedexLabelWindow(imageList);
labelWindow.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
SessionManager.getAppDesktop().showWindow(labelWindow);
}
});
}
}
return htmls.size() + " labels loaded.";