hg merge release-2.1 (merge release2.1 into development)
This commit is contained in:
commit
064e044968
|
@ -0,0 +1,35 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-475 Show quotation number on invoice
|
||||
-- Apr 20, 2015 2:46:17 PM COT
|
||||
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (200199,0,0,'Y',TO_DATE('2015-04-20 14:46:17','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-04-20 14:46:17','YYYY-MM-DD HH24:MI:SS'),100,'QuotationOrder_ID','Quotation','Quotation used for generating this order','Quotation','D','2490fc7b-55b8-4957-b7b3-66d92142f301')
|
||||
;
|
||||
|
||||
-- Apr 20, 2015 2:50:54 PM COT
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (200819,0,'Quotation','Quotation used for generating this order',259,'QuotationOrder_ID',10,'N','N','N','N','N',0,'N',30,290,0,0,'Y',TO_DATE('2015-04-20 14:50:54','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-04-20 14:50:54','YYYY-MM-DD HH24:MI:SS'),100,200199,'Y','N','D','N','N','N','Y','f0bc7f90-eca2-412b-ae6f-da8fe38b08d3','Y',0,'N','N')
|
||||
;
|
||||
|
||||
-- Apr 20, 2015 2:57:31 PM COT
|
||||
UPDATE AD_Column SET FKConstraintName='QuotationOrder_COrder', FKConstraintType='N',Updated=TO_DATE('2015-04-20 14:57:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200819
|
||||
;
|
||||
|
||||
-- Apr 20, 2015 2:57:31 PM COT
|
||||
ALTER TABLE C_Order ADD QuotationOrder_ID NUMBER(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Apr 20, 2015 2:57:32 PM COT
|
||||
ALTER TABLE C_Order ADD CONSTRAINT QuotationOrder_COrder FOREIGN KEY (QuotationOrder_ID) REFERENCES c_order(c_order_id) DEFERRABLE INITIALLY DEFERRED
|
||||
;
|
||||
|
||||
-- Apr 20, 2015 2:58:16 PM COT
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (200756,'Quotation','Quotation used for generating this order',186,200819,'Y',10,570,'N','N','N','N',0,0,'Y',TO_DATE('2015-04-20 14:58:16','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-04-20 14:58:16','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','479c2982-2986-4b25-9171-172921522732','Y',570,2)
|
||||
;
|
||||
|
||||
-- Apr 20, 2015 3:00:55 PM COT
|
||||
UPDATE AD_Field SET DisplayLogic='@QuotationOrder_ID@>0', IsReadOnly='Y',Updated=TO_DATE('2015-04-20 15:00:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200756
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201504201502_IDEMPIERE-475.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-2587 Can't login by SuperUser to client with client roles has Use User Org Access
|
||||
-- Apr 21, 2015 12:20:54 PM COT
|
||||
UPDATE AD_Tab SET WhereClause=NULL,Updated=TO_DATE('2015-04-21 12:20:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=118
|
||||
;
|
||||
|
||||
-- Apr 21, 2015 12:21:25 PM COT
|
||||
UPDATE AD_Column SET DefaultValue='@#AD_Client_ID@',Updated=TO_DATE('2015-04-21 12:21:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=13440
|
||||
;
|
||||
|
||||
-- Apr 21, 2015 12:21:30 PM COT
|
||||
UPDATE AD_Column SET DefaultValue='@#AD_Org_ID@', IsUpdateable='N',Updated=TO_DATE('2015-04-21 12:21:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=13439
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201504211222_IDEMPIERE-2587.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-2584 Field Sequence items not placed together in Purchase Order
|
||||
-- Apr 21, 2015 1:23:36 PM COT
|
||||
UPDATE AD_Field SET AD_FieldGroup_ID=130,Updated=TO_DATE('2015-04-21 13:23:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=55413
|
||||
;
|
||||
|
||||
-- Apr 21, 2015 1:23:43 PM COT
|
||||
UPDATE AD_Field SET AD_FieldGroup_ID=130,Updated=TO_DATE('2015-04-21 13:23:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=55414
|
||||
;
|
||||
|
||||
-- Apr 21, 2015 1:23:50 PM COT
|
||||
UPDATE AD_Field SET AD_FieldGroup_ID=130,Updated=TO_DATE('2015-04-21 13:23:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=55415
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201504211325_IDEMPIERE-2584.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
delete from ad_preference where ad_user_id is null and (attribute like '%|DetailPane.Height' or attribute like '%|DetailPane.IsOpen')
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201504220959_IDEMPIERE-581.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
-- IDEMPIERE-475 Show quotation number on invoice
|
||||
-- Apr 20, 2015 2:46:17 PM COT
|
||||
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (200199,0,0,'Y',TO_TIMESTAMP('2015-04-20 14:46:17','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-04-20 14:46:17','YYYY-MM-DD HH24:MI:SS'),100,'QuotationOrder_ID','Quotation','Quotation used for generating this order','Quotation','D','2490fc7b-55b8-4957-b7b3-66d92142f301')
|
||||
;
|
||||
|
||||
-- Apr 20, 2015 2:50:54 PM COT
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (200819,0,'Quotation','Quotation used for generating this order',259,'QuotationOrder_ID',10,'N','N','N','N','N',0,'N',30,290,0,0,'Y',TO_TIMESTAMP('2015-04-20 14:50:54','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-04-20 14:50:54','YYYY-MM-DD HH24:MI:SS'),100,200199,'Y','N','D','N','N','N','Y','f0bc7f90-eca2-412b-ae6f-da8fe38b08d3','Y',0,'N','N')
|
||||
;
|
||||
|
||||
-- Apr 20, 2015 2:57:31 PM COT
|
||||
UPDATE AD_Column SET FKConstraintName='QuotationOrder_COrder', FKConstraintType='N',Updated=TO_TIMESTAMP('2015-04-20 14:57:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200819
|
||||
;
|
||||
|
||||
-- Apr 20, 2015 2:57:31 PM COT
|
||||
ALTER TABLE C_Order ADD COLUMN QuotationOrder_ID NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Apr 20, 2015 2:57:32 PM COT
|
||||
ALTER TABLE C_Order ADD CONSTRAINT QuotationOrder_COrder FOREIGN KEY (QuotationOrder_ID) REFERENCES c_order(c_order_id) DEFERRABLE INITIALLY DEFERRED
|
||||
;
|
||||
|
||||
-- Apr 20, 2015 2:58:16 PM COT
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (200756,'Quotation','Quotation used for generating this order',186,200819,'Y',10,570,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-04-20 14:58:16','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-04-20 14:58:16','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','479c2982-2986-4b25-9171-172921522732','Y',570,2)
|
||||
;
|
||||
|
||||
-- Apr 20, 2015 3:00:55 PM COT
|
||||
UPDATE AD_Field SET DisplayLogic='@QuotationOrder_ID@>0', IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-04-20 15:00:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200756
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201504201502_IDEMPIERE-475.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
-- IDEMPIERE-2587 Can't login by SuperUser to client with client roles has Use User Org Access
|
||||
-- Apr 21, 2015 12:20:54 PM COT
|
||||
UPDATE AD_Tab SET WhereClause=NULL,Updated=TO_TIMESTAMP('2015-04-21 12:20:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=118
|
||||
;
|
||||
|
||||
-- Apr 21, 2015 12:21:25 PM COT
|
||||
UPDATE AD_Column SET DefaultValue='@#AD_Client_ID@',Updated=TO_TIMESTAMP('2015-04-21 12:21:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=13440
|
||||
;
|
||||
|
||||
-- Apr 21, 2015 12:21:30 PM COT
|
||||
UPDATE AD_Column SET DefaultValue='@#AD_Org_ID@', IsUpdateable='N',Updated=TO_TIMESTAMP('2015-04-21 12:21:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=13439
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201504211222_IDEMPIERE-2587.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
-- IDEMPIERE-2584 Field Sequence items not placed together in Purchase Order
|
||||
-- Apr 21, 2015 1:23:36 PM COT
|
||||
UPDATE AD_Field SET AD_FieldGroup_ID=130,Updated=TO_TIMESTAMP('2015-04-21 13:23:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=55413
|
||||
;
|
||||
|
||||
-- Apr 21, 2015 1:23:43 PM COT
|
||||
UPDATE AD_Field SET AD_FieldGroup_ID=130,Updated=TO_TIMESTAMP('2015-04-21 13:23:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=55414
|
||||
;
|
||||
|
||||
-- Apr 21, 2015 1:23:50 PM COT
|
||||
UPDATE AD_Field SET AD_FieldGroup_ID=130,Updated=TO_TIMESTAMP('2015-04-21 13:23:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=55415
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201504211325_IDEMPIERE-2584.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
delete from ad_preference where ad_user_id is null and (attribute like '%|DetailPane.Height' or attribute like '%|DetailPane.IsOpen')
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201504220959_IDEMPIERE-581.sql') FROM dual
|
||||
;
|
||||
|
|
@ -86,6 +86,7 @@ public class CopyOrder extends SvrProcess
|
|||
MOrder newOrder = MOrder.copyFrom (from, p_DateDoc,
|
||||
dt.getC_DocType_ID(), dt.isSOTrx(), false, true, get_TrxName()); // copy ASI
|
||||
newOrder.setC_DocTypeTarget_ID(p_C_DocType_ID);
|
||||
newOrder.setQuotationOrder_ID(from.getC_Order_ID()); // IDEMPIERE-475
|
||||
boolean OK = newOrder.save();
|
||||
if (!OK)
|
||||
throw new IllegalStateException("Could not create new Order");
|
||||
|
|
|
@ -189,6 +189,7 @@ public class OrderPOCreate extends SvrProcess
|
|||
+ "FROM M_Product_PO po"
|
||||
+ " INNER JOIN C_OrderLine ol ON (po.M_Product_ID=ol.M_Product_ID) "
|
||||
+ "WHERE ol.C_Order_ID=? AND po.IsCurrentVendor='Y' "
|
||||
+ "AND po.IsActive='Y' "
|
||||
+ ((p_Vendor_ID > 0) ? " AND po.C_BPartner_ID=? " : "")
|
||||
+ "GROUP BY po.M_Product_ID "
|
||||
+ "ORDER BY 1";
|
||||
|
@ -283,13 +284,14 @@ public class OrderPOCreate extends SvrProcess
|
|||
if ( p_IsDropShip )
|
||||
{
|
||||
po.setIsDropShip(p_IsDropShip);
|
||||
|
||||
po.setDeliveryViaRule(so.getDeliveryViaRule());
|
||||
po.setM_Shipper_ID(so.getM_Shipper_ID());
|
||||
|
||||
if (so.isDropShip() && so.getDropShip_BPartner_ID() != 0 ) {
|
||||
po.setDropShip_BPartner_ID(so.getDropShip_BPartner_ID());
|
||||
po.setDropShip_Location_ID(so.getDropShip_Location_ID());
|
||||
po.setDropShip_User_ID(so.getDropShip_User_ID());
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
po.setDropShip_BPartner_ID(so.getC_BPartner_ID());
|
||||
po.setDropShip_Location_ID(so.getC_BPartner_Location_ID());
|
||||
po.setDropShip_User_ID(so.getAD_User_ID());
|
||||
|
|
|
@ -1071,6 +1071,21 @@ public interface I_C_Order
|
|||
*/
|
||||
public String getPromotionCode();
|
||||
|
||||
/** Column name QuotationOrder_ID */
|
||||
public static final String COLUMNNAME_QuotationOrder_ID = "QuotationOrder_ID";
|
||||
|
||||
/** Set Quotation.
|
||||
* Quotation used for generating this order
|
||||
*/
|
||||
public void setQuotationOrder_ID (int QuotationOrder_ID);
|
||||
|
||||
/** Get Quotation.
|
||||
* Quotation used for generating this order
|
||||
*/
|
||||
public int getQuotationOrder_ID();
|
||||
|
||||
public org.compiere.model.I_C_Order getQuotationOrder() throws RuntimeException;
|
||||
|
||||
/** Column name Ref_Order_ID */
|
||||
public static final String COLUMNNAME_Ref_Order_ID = "Ref_Order_ID";
|
||||
|
||||
|
|
|
@ -1765,6 +1765,9 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
|||
payment.saveEx();
|
||||
info.append("@C_Payment_ID@: " + payment.getDocumentInfo());
|
||||
|
||||
// IDEMPIERE-2588 - add the allocation generation with the payment
|
||||
if (payment.getJustCreatedAllocInv() != null)
|
||||
addDocsPostProcess(payment.getJustCreatedAllocInv());
|
||||
} // Payment
|
||||
|
||||
// Update Order & Match
|
||||
|
|
|
@ -83,7 +83,7 @@ public class MPayment extends X_C_Payment
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -7646717328867858897L;
|
||||
private static final long serialVersionUID = -7179638016937305380L;
|
||||
|
||||
/**
|
||||
* Get Payments Of BPartner
|
||||
|
@ -2303,6 +2303,7 @@ public class MPayment extends X_C_Payment
|
|||
throw new AdempiereException("Failed when processing document - " + alloc.getProcessMsg());
|
||||
// end added
|
||||
alloc.saveEx(get_TrxName());
|
||||
m_justCreatedAllocInv = alloc;
|
||||
m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo();
|
||||
|
||||
// Get Project from Invoice
|
||||
|
@ -2997,5 +2998,11 @@ public class MPayment extends X_C_Payment
|
|||
|
||||
return MPaymentTransaction.getAllIDs(Table_Name, whereClause.toString(), trxName);
|
||||
}
|
||||
|
||||
// IDEMPIERE-2588
|
||||
private MAllocationHdr m_justCreatedAllocInv = null;
|
||||
public MAllocationHdr getJustCreatedAllocInv() {
|
||||
return m_justCreatedAllocInv;
|
||||
}
|
||||
|
||||
} // MPayment
|
||||
|
|
|
@ -33,7 +33,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20141030L;
|
||||
private static final long serialVersionUID = 20150420L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_C_Order (Properties ctx, int C_Order_ID, String trxName)
|
||||
|
@ -1983,6 +1983,34 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return (String)get_Value(COLUMNNAME_PromotionCode);
|
||||
}
|
||||
|
||||
public org.compiere.model.I_C_Order getQuotationOrder() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_C_Order)MTable.get(getCtx(), org.compiere.model.I_C_Order.Table_Name)
|
||||
.getPO(getQuotationOrder_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Quotation.
|
||||
@param QuotationOrder_ID
|
||||
Quotation used for generating this order
|
||||
*/
|
||||
public void setQuotationOrder_ID (int QuotationOrder_ID)
|
||||
{
|
||||
if (QuotationOrder_ID < 1)
|
||||
set_Value (COLUMNNAME_QuotationOrder_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_QuotationOrder_ID, Integer.valueOf(QuotationOrder_ID));
|
||||
}
|
||||
|
||||
/** Get Quotation.
|
||||
@return Quotation used for generating this order
|
||||
*/
|
||||
public int getQuotationOrder_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_QuotationOrder_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_C_Order getRef_Order() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_C_Order)MTable.get(getCtx(), org.compiere.model.I_C_Order.Table_Name)
|
||||
|
|
|
@ -316,7 +316,7 @@ public class DocumentEngine implements DocAction
|
|||
if (m_document != null && ok)
|
||||
{
|
||||
// PostProcess documents when invoice or inout (this is to postprocess the generated MatchPO and MatchInv if any)
|
||||
ArrayList<PO> docsPostProcess = new ArrayList<PO>();;
|
||||
ArrayList<PO> docsPostProcess = new ArrayList<PO>();
|
||||
if (m_document instanceof MInvoice || m_document instanceof MInOut) {
|
||||
if (m_document instanceof MInvoice) {
|
||||
docsPostProcess = ((MInvoice) m_document).getDocsPostProcess();
|
||||
|
|
|
@ -27,6 +27,7 @@ import java.io.IOException;
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
/**
|
||||
|
@ -423,7 +424,7 @@ public class FileUtil
|
|||
String dt = sdf.format(cal.getTime());
|
||||
String cleanName = subject.replaceAll("[ &/]", "");
|
||||
String localFile = System.getProperty("java.io.tmpdir")
|
||||
+ System.getProperty("file.separator") + cleanName + "_" + dt
|
||||
+ System.getProperty("file.separator") + cleanName + "_" + dt + "_" + Env.getContext(Env.getCtx(), "#AD_Session_ID")
|
||||
+ extension;
|
||||
return localFile;
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ import org.adempiere.base.Core;
|
|||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.adempiere.webui.AdempiereIdGenerator;
|
||||
import org.adempiere.webui.AdempiereWebUI;
|
||||
import org.adempiere.webui.ClientInfo;
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.component.Borderlayout;
|
||||
import org.adempiere.webui.component.Column;
|
||||
|
@ -51,6 +52,7 @@ import org.adempiere.webui.editor.WPaymentEditor;
|
|||
import org.adempiere.webui.editor.WebEditorFactory;
|
||||
import org.adempiere.webui.event.ContextMenuListener;
|
||||
import org.adempiere.webui.panel.HelpController;
|
||||
import org.adempiere.webui.session.SessionManager;
|
||||
import org.adempiere.webui.util.GridTabDataBinder;
|
||||
import org.adempiere.webui.util.TreeUtils;
|
||||
import org.adempiere.webui.window.FDialog;
|
||||
|
@ -64,6 +66,7 @@ import org.compiere.model.I_AD_Preference;
|
|||
import org.compiere.model.MLookup;
|
||||
import org.compiere.model.MPreference;
|
||||
import org.compiere.model.MRole;
|
||||
import org.compiere.model.MSysConfig;
|
||||
import org.compiere.model.MTab;
|
||||
import org.compiere.model.MTable;
|
||||
import org.compiere.model.MToolBarButton;
|
||||
|
@ -86,6 +89,7 @@ import org.zkoss.zk.ui.Component;
|
|||
import org.zkoss.zk.ui.Executions;
|
||||
import org.zkoss.zk.ui.HtmlBasedComponent;
|
||||
import org.zkoss.zk.ui.IdSpace;
|
||||
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;
|
||||
|
@ -283,6 +287,22 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
|
|||
south.setSplittable(true);
|
||||
south.setOpen(isOpenDetailPane());
|
||||
south.setSclass("adwindow-gridview-detail");
|
||||
String height = heigthDetailPane();
|
||||
if (! Util.isEmpty(height)) {
|
||||
try {
|
||||
ClientInfo browserInfo = SessionManager.getAppDesktop().getClientInfo();
|
||||
int browserHeight = browserInfo.desktopHeight;
|
||||
int prefHeight = Integer.valueOf(height.replace("px", ""));
|
||||
int topmarginpx = MSysConfig.getIntValue("TOP_MARGIN_PIXELS_FOR_HEADER", 222);
|
||||
int maxHeight = browserHeight - topmarginpx;
|
||||
if (prefHeight <= maxHeight) {
|
||||
height = Integer.toString(prefHeight) + "px";
|
||||
formContainer.getSouth().setHeight(height);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// just ignore exception is harmless here, consequence is just not setting height so it will assume the default of theme
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1085,19 +1105,19 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
|
|||
int windowId = getGridTab().getAD_Window_ID();
|
||||
int adTabId = getGridTab().getAD_Tab_ID();
|
||||
if (windowId > 0 && adTabId > 0) {
|
||||
Query query = new Query(Env.getCtx(), MTable.get(Env.getCtx(), I_AD_Preference.Table_ID), "AD_Window_ID=? AND Attribute=? AND AD_Process_ID IS NULL AND PreferenceFor = 'W'", null);
|
||||
Query query = new Query(Env.getCtx(), MTable.get(Env.getCtx(), I_AD_Preference.Table_ID), "AD_Window_ID=? AND Attribute=? AND AD_User_ID=? AND AD_Process_ID IS NULL AND PreferenceFor = 'W'", null);
|
||||
int userId = Env.getAD_User_ID(Env.getCtx());
|
||||
MPreference preference = query.setOnlyActiveRecords(true)
|
||||
.setApplyAccessFilter(true)
|
||||
.setParameters(windowId, adTabId+"|DetailPane.IsOpen")
|
||||
.setParameters(windowId, adTabId+"|DetailPane.IsOpen", userId)
|
||||
.first();
|
||||
if (preference != null && preference.getAD_Preference_ID() > 0) {
|
||||
preference.setValue(value ? "Y" : "N");
|
||||
} else {
|
||||
if (preference == null || preference.getAD_Preference_ID() <= 0) {
|
||||
preference = new MPreference(Env.getCtx(), 0, null);
|
||||
preference.setAD_Window_ID(windowId);
|
||||
preference.setAD_User_ID(userId);
|
||||
preference.setAttribute(adTabId+"|DetailPane.IsOpen");
|
||||
preference.setValue(value ? "Y" : "N");
|
||||
}
|
||||
preference.setValue(value ? "Y" : "N");
|
||||
preference.saveEx();
|
||||
//update current context
|
||||
Env.getCtx().setProperty("P"+windowId+"|"+adTabId+"|DetailPane.IsOpen", value ? "Y" : "N");
|
||||
|
@ -1139,7 +1159,17 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
|
|||
}
|
||||
return open;
|
||||
}
|
||||
|
||||
|
||||
private String heigthDetailPane() {
|
||||
String height = null;
|
||||
int windowId = getGridTab().getAD_Window_ID();
|
||||
int adTabId = getGridTab().getAD_Tab_ID();
|
||||
if (windowId > 0 && adTabId > 0) {
|
||||
height = Env.getPreference(Env.getCtx(), windowId, adTabId+"|DetailPane.Height", false);
|
||||
}
|
||||
return height;
|
||||
}
|
||||
|
||||
private void navigateTo(DefaultTreeNode<MTreeNode> value) {
|
||||
MTreeNode treeNode = value.getData();
|
||||
// We Have a TreeNode
|
||||
|
@ -1704,4 +1734,36 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
|
|||
return retValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageDetached(Page page) {
|
||||
if (formContainer.getSouth() != null) {
|
||||
if (formContainer.getSouth().isVisible() && formContainer.getSouth().isOpen()) {
|
||||
String height = formContainer.getSouth().getHeight();
|
||||
if (! Util.isEmpty(height)) {
|
||||
int windowId = getGridTab().getAD_Window_ID();
|
||||
int adTabId = getGridTab().getAD_Tab_ID();
|
||||
if (windowId > 0 && adTabId > 0) {
|
||||
Query query = new Query(Env.getCtx(), MTable.get(Env.getCtx(), I_AD_Preference.Table_ID), "AD_Window_ID=? AND Attribute=? AND AD_User_ID=? AND AD_Process_ID IS NULL AND PreferenceFor = 'W'", null);
|
||||
int userId = Env.getAD_User_ID(Env.getCtx());
|
||||
MPreference preference = query.setOnlyActiveRecords(true)
|
||||
.setApplyAccessFilter(true)
|
||||
.setParameters(windowId, adTabId+"|DetailPane.Height", userId)
|
||||
.first();
|
||||
if (preference == null || preference.getAD_Preference_ID() <= 0) {
|
||||
preference = new MPreference(Env.getCtx(), 0, null);
|
||||
preference.setAD_Window_ID(windowId);
|
||||
preference.setAD_User_ID(userId);
|
||||
preference.setAttribute(adTabId+"|DetailPane.Height");
|
||||
}
|
||||
preference.setValue(height);
|
||||
preference.saveEx();
|
||||
//update current context
|
||||
Env.getCtx().setProperty("P"+windowId+"|"+adTabId+"|DetailPane.Height", height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
super.onPageDetached(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -200,7 +200,9 @@ public class WReportCustomization implements IFormController,EventListener<Even
|
|||
headerPanel.appendChild(tor);
|
||||
|
||||
selectAll = new Label(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "SelectAll")));
|
||||
selectAll.setStyle("cursor:pointer;text-decoration: underline;");
|
||||
deselectAll= new Label(Msg.getMsg(Env.getCtx(), "DeSelectAll"));
|
||||
deselectAll.setStyle("cursor:pointer;text-decoration: underline;");
|
||||
pipeSeparator = new Label("|");
|
||||
selectAll.setAttribute("name", "SelectAll");
|
||||
deselectAll.setAttribute("name", "DeselectAll");
|
||||
|
|
|
@ -19,6 +19,7 @@ import java.util.Collections;
|
|||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import org.compiere.apps.form.TreeMaintenance;
|
||||
import org.zkoss.lang.Objects;
|
||||
import org.zkoss.zul.AbstractListModel;
|
||||
import org.zkoss.zul.Listbox;
|
||||
|
@ -101,6 +102,15 @@ public class SimpleListModel extends AbstractListModel<Object> implements Listit
|
|||
listCell.setParent(item);
|
||||
if (tooltip != null)
|
||||
listCell.setTooltiptext(tooltip);
|
||||
// IDEMPIERE-492
|
||||
boolean isSummary = false;
|
||||
Object li = null;
|
||||
if (item != null && list != null)
|
||||
li = list.get(item.getIndex());
|
||||
if (li != null && li instanceof TreeMaintenance.ListItem)
|
||||
isSummary = ((TreeMaintenance.ListItem)li).isSummary;
|
||||
if (isSummary)
|
||||
ZkCssHelper.appendStyle(listCell, "font-weight: bold");
|
||||
}
|
||||
|
||||
private void renderCollection(Listitem item, Collection<?> data) {
|
||||
|
|
|
@ -624,12 +624,14 @@ public class LoginPanel extends Window implements EventListener<Event>
|
|||
}
|
||||
|
||||
private String getUpdateTimeoutTextScript() {
|
||||
String msg = Msg.getMsg(Env.getCtx(), "SessionTimeoutText");
|
||||
String msg = Msg.getMsg(Env.getCtx(), "SessionTimeoutText").trim(); //IDEMPIERE-847
|
||||
String continueNsg = Msg.getMsg(Env.getCtx(), "continue").trim(); //IDEMPIERE-847
|
||||
if (msg == null || msg.equals("SessionTimeoutText")) {
|
||||
return null;
|
||||
}
|
||||
msg = Strings.escape(msg, "\"");
|
||||
String s = "adempiere.store.set(\"zkTimeoutText\", \"" + msg + "\")";
|
||||
String s = "adempiere.store.set(\"zkTimeoutText\", \"" + msg + "\");";//IDEMPIERE-847
|
||||
s = s + " adempiere.store.set(\"zkContinueText\", \"" + continueNsg + "\");"; //IDEMPIERE-847
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.Env;
|
||||
import org.adempiere.webui.theme.ThemeManager;
|
||||
var continueText = Msg.getMsg(Env.getCtx(),"continue");
|
||||
self.setTitle(ThemeManager.getBrowserTitle());
|
||||
]]>
|
||||
</zscript>
|
||||
|
@ -16,7 +15,7 @@
|
|||
|
||||
<div id="timeoutText"></div>
|
||||
<div style="margin-top: 10px">
|
||||
<toolbarbutton href="/index.zul" label="${continueText}"/>
|
||||
<toolbarbutton id="continueText" href="/index.zul" label="Continue"/>
|
||||
</div>
|
||||
</vbox>
|
||||
<script defer="true">
|
||||
|
@ -27,8 +26,14 @@
|
|||
document.getElementById("${timeoutText.uuid}").innerHTML = val;
|
||||
}
|
||||
};
|
||||
|
||||
var callbackC = function(ok, val) {
|
||||
if (ok && !!val)
|
||||
{
|
||||
document.getElementById("${continueText.uuid}").innerHTML = val;
|
||||
}
|
||||
};
|
||||
adempiere.store.get("zkTimeoutText", callback);
|
||||
adempiere.store.get("zkContinueText", callbackC);
|
||||
]]>
|
||||
</script>
|
||||
</window>
|
||||
|
|
Loading…
Reference in New Issue