OrderLineValidator & Compile

Developers
Yan
2010-10-27
2013-03-08
  • Yan

    Yan - 2010-10-27

    Hi everyone,

    I've updated adempiere to revision 14356.
    If i launch Adempiere using Eclipse, it works fine.

    But if i compile (using utils_dev\RUN_Build.bat) and unzipping ; then i am unable to enter using a non SystemAdministrator Role.
    I got the error message :

    ===========> Login.validateLogin: Refused: nulljava.lang.ClassNotFoundException: org.adempiere.validator.Order
    LineValidator global

    -------> Msg.getMsg: NOT found: nulljava.lang.ClassNotFoundException: org.adempiere.validator.OrderLineVal
    idator global

    If i deactivate the Record 50005 in the AD_ModelValidator table (Order Line Validator ; org.adempiere.validator.OrderLineValidator), it goes fine !

    Did i missed something ?

    Thanks,

    Yan

     
  • Virginia  Correa

    Virginia Correa - 2010-11-22

    Hi everyone
    I am facing the same exception, we migrate from 343 version to 360 lts and in the web version as the swing client version have the same problem.
    The class is set in the database as yansolo reported but i can not find it in the source code
    Can someone help me?

    Thanks in advance
    Virginia

     
  • Carlos Ruiz

    Carlos Ruiz - 2010-11-23

    Hi Yan, perhaps you didn't run RUN_setup.

    Hi Virginia, to migrate to 360 you don't need to apply the migration scripts on trunk, if you apply migration scripts from trunk (those at trunk/migration/360lts-release/postgresql/…) then you would need to compile trunk to create your own installer.  Recommendation for production sites: stick to a version and perhaps use patches to fix problems (note some patches require migration scripts, but not all from trunk, those from the corresponding patches branch)

    Regards,

    Carlos Ruiz

     
  • Virginia  Correa

    Virginia Correa - 2010-11-29

    Hi Carlos, thanks for your time , what we found with Damian is the following file with the classes needed :
    Yan maybe this helps u

    Index: base/src/org/adempiere/process/DatePromisedMsg.java

    -- base/src/org/adempiere/process/DatePromisedMsg.java (revision 0)
    +++ base/src/org/adempiere/process/DatePromisedMsg.java (revision 0)
    @@ -0,0 +1,70 @@
    +package org.adempiere.process;
    +
    +/**
    + * Class that contains information about a promised date update message
    + *
    + * @author Daniel Tamm
    + *
    + */
    +public class DatePromisedMsg {
    +
    + public String bPartnerNo;
    + public String bPartnerArticleNo;
    + public java.util.Date promisedDate;
    + public java.util.Date msgTime;
    + public String promisedDatePrecision;
    + public double deliveryCount;
    + public double estimatedPriceEach;
    + public String currencyISO;
    +
    +
    + public String getbPartnerNo() {
    + return bPartnerNo;
    + }
    + public void setbPartnerNo(String bPartnerNo) {
    + this.bPartnerNo = bPartnerNo;
    + }
    + public String getbPartnerArticleNo() {
    + return bPartnerArticleNo;
    + }
    + public void setbPartnerArticleNo(String bPartnerArticleNo) {
    + this.bPartnerArticleNo = bPartnerArticleNo;
    + }
    + public java.util.Date getPromisedDate() {
    + return promisedDate;
    + }
    + public void setPromisedDate(java.util.Date promisedDate) {
    + this.promisedDate = promisedDate;
    + }
    + public java.util.Date getMsgTime() {
    + return msgTime;
    + }
    + public void setMsgTime(java.util.Date msgTime) {
    + this.msgTime = msgTime;
    + }
    + public String getPromisedDatePrecision() {
    + return promisedDatePrecision;
    + }
    + public void setPromisedDatePrecision(String promisedDatePrecision) {
    + this.promisedDatePrecision = promisedDatePrecision;
    + }
    + public double getDeliveryCount() {
    + return deliveryCount;
    + }
    + public void setDeliveryCount(double deliveryCount) {
    + this.deliveryCount = deliveryCount;
    + }
    + public double getEstimatedPriceEach() {
    + return estimatedPriceEach;
    + }
    + public void setEstimatedPriceEach(double estimatedPriceEach) {
    + this.estimatedPriceEach = estimatedPriceEach;
    + }
    + public String getCurrencyISO() {
    + return currencyISO;
    + }
    + public void setCurrencyISO(String currencyISO) {
    + this.currencyISO = currencyISO;
    + }
    +
    +}
    Index: base/src/org/adempiere/process/DatePromisedUpdateProcess.java
    ===================================================================
    -- base/src/org/adempiere/process/DatePromisedUpdateProcess.java (revision 0)
    +++ base/src/org/adempiere/process/DatePromisedUpdateProcess.java (revision 0)
    @@ -0,0 +1,129 @@
    +package org.adempiere.process;
    +
    +import java.math.BigDecimal;
    +import java.sql.PreparedStatement;
    +import java.sql.ResultSet;
    +import java.util.Calendar;
    +import java.util.logging.Level;
    +
    +import org.adempiere.exceptions.AdempiereException;
    +import org.compiere.model.MBPartner;
    +import org.compiere.model.MProduct;
    +import org.compiere.model.MProductPO;
    +import org.compiere.model.Query;
    +import org.compiere.process.ProcessInfoParameter;
    +import org.compiere.process.SvrProcess;
    +import org.compiere.util.DB;
    +
    +/**
    + * Process that updates the promised date of a specific product
    + *
    + * @author Daniel Tamm
    + *
    + */
    +public class DatePromisedUpdateProcess extends SvrProcess {
    +
    + private DatePromisedMsg m_msg;
    + private MBPartner m_bPartner;
    + private MProduct m_product;
    +
    + @Override
    + protected void prepare() {
    + if (m_msg==null) {
    + m_msg = new DatePromisedMsg();
    + }
    +
    + m_msg.setMsgTime(new java.util.Date(Calendar.getInstance().getTimeInMillis()));
    +
    +        ProcessInfoParameter para = getParameter();
    +        for (int i = 0; i < para.length; i++) {
    +            String name = para_.getParameterName();
    +            if (para.getParameter() == null);
    +            else if (name.equals("PromisedDateMsg")) {
    +            m_msg = (DatePromisedMsg)para.getParameter();
    +            } else if (name.equals("C_BPartner_ID")) {
    +            // Lookup business partner
    +            m_bPartner = new MBPartner(getCtx(), para.getParameterAsInt(), get_TrxName());
    +            } else if (name.equals("M_Product_ID")) {
    +            m_product = new MProduct(getCtx(), para.getParameterAsInt(), get_TrxName());
    +            } else if (name.equals("DatePromised")) {
    +            m_msg.setPromisedDate((java.util.Date)para.getParameter());
    +            } else if (name.equals("DatePrecision")) {
    +            m_msg.setPromisedDatePrecision((String)para.getParameter());
    +            } else if (name.equals("Qty")) {
    +            BigDecimal qty = (BigDecimal)para.getParameter();
    +            m_msg.setDeliveryCount(qty.doubleValue());
    +            } else {
    +                log.log(Level.SEVERE, "Unknown Parameter: " + name);
    +            }
    +        }
    + }
    +
    + @Override
    + protected String doIt() throws Exception {
    +
    + return(updatePromisedDate(m_msg));
    +
    + }
    +
    + /**
    + * Updates promised date by calling a database stored procedure.
    + *
    + * This method is public because it can be called either via normal process running or directly
    + * from another thread.
    + *
    + * @param msg
    + * @return
    + * @throws Exception
    + */
    + public String updatePromisedDate(DatePromisedMsg msg) throws Exception {
    + StringBuffer result = new StringBuffer();
    +
    + // Find Business Partner and product. If BPartner is already set in "prepare" the bpartner in msg
    + // is disregarded.
    + if (m_bPartner==null) {
    + m_bPartner = MBPartner.get(getCtx(), msg.getbPartnerNo());
    + if (m_bPartner==null) {
    + throw new AdempiereException("No Business Partner with value " + msg.getbPartnerNo());
    + }
    + }
    + // Find product. If product is already set in "prepare" the product value in msg is disregarded.
    + if (m_product==null) {
    + // First look in M_Product_PO
    + MProductPO productPo = new Query(getCtx(), MProductPO.Table_Name, "VendorProductNo=? AND C_BPartner_ID=?", get_TrxName())
    + .setParameters(new Object{msg.getbPartnerArticleNo(), m_bPartner.get_ID()})
    + .first();
    + if (productPo==null) {
    + // Check if we have a product with that ID
    + m_product = new Query(getCtx(), MProductPO.Table_Name, "Value=?", get_TrxName())
    + .setParameters(new Object{msg.getbPartnerArticleNo()})
    + .setClient_ID()
    + .first();
    + } else {
    + m_product = new MProduct(getCtx(), productPo.getM_Product_ID(), get_TrxName());
    + }
    + if (m_product==null) {
    + throw new AdempiereException("No product with value " + msg.getbPartnerArticleNo());
    + }
    + }
    +
    + // Call stored procedure
    + if (DB.isPostgreSQL()) {
    +
    + String query = "select update_promiseddate(?::numeric, ?::numeric, ?::date, ?::date, ?::char(1), ?::numeric)";
    + PreparedStatement ps = DB.prepareStatement(query, get_TrxName());
    + ps.setInt(1, m_product.get_ID());
    + ps.setInt(2, m_bPartner.get_ID());
    + ps.setDate(3, msg.getPromisedDate()!=null ? new java.sql.Date(msg.getPromisedDate().getTime()) : null);
    + ps.setDate(4, msg.getMsgTime()!=null ? new java.sql.Date(msg.getMsgTime().getTime()) : null);
    + ps.setString(5, msg.getPromisedDatePrecision());
    + ps.setDouble(6, msg.getDeliveryCount());
    + ps.execute();
    + ResultSet rs = ps.getResultSet();
    +
    + }
    +
    + return(result.toString());
    + }
    +
    +}
    Index: base/src/org/adempiere/validator/OrderLineValidator.java
    ===================================================================
    -- base/src/org/adempiere/validator/OrderLineValidator.java (revision 0)
    +++ base/src/org/adempiere/validator/OrderLineValidator.java (revision 0)
    @@ -0,0 +1,158 @@
    +package org.adempiere.validator;
    +
    +import javax.swing.JOptionPane;
    +import org.adempiere.process.DatePromisedUpdateProcess;
    +import org.compiere.model.MClient;
    +import org.compiere.model.MOrder;
    +import org.compiere.model.MOrderLine;
    +import org.compiere.model.MPInstance;
    +import org.compiere.model.MProcess;
    +import org.compiere.model.ModelValidationEngine;
    +import org.compiere.model.ModelValidator;
    +import org.compiere.model.PO;
    +import org.compiere.process.ProcessInfo;
    +import org.compiere.process.ProcessInfoParameter;
    +import org.compiere.util.CLogger;
    +import org.compiere.util.Env;
    +import org.compiere.util.Ini;
    +import org.compiere.util.Msg;
    +
    +/**
    + * Specific class for order line validator. Currently validates order lines with regards to
    + * date promised. If a purchase order has updated date promised, relevant sales orders
    + * can be updated.
    + *
    + * @author Daniel Tamm
    + *
    + */
    +public class OrderLineValidator implements ModelValidator {
    +
    + private static final CLogger logger = CLogger.getCLogger(OrderLineValidator.class);
    +
    + private int ad_Client_ID = -1;
    +
    + @Override
    + public int getAD_Client_ID() {
    + return ad_Client_ID;
    + }
    +
    + @Override
    + public void initialize(ModelValidationEngine engine, MClient client) {
    +
    +        if (client != null) {
    +            ad_Client_ID = client.getAD_Client_ID();
    +        }
    +        engine.addModelChange(MOrderLine.Table_Name, this);
    + }
    +
    + @Override
    + public String docValidate(PO po, int timing) {
    + return null;
    + }
    +
    + public String login(final int AD_Org_ID, final int AD_Role_ID,
    + final int AD_User_ID) {
    +
    + logger.info("AD_Org_ID=" + AD_Org_ID + "; AD_Role_ID=" + AD_Role_ID
    + + "; AD_User_ID=" + AD_User_ID);
    +
    + return null;
    + }
    +
    + /**
    + * Checks for changes in Date Promised. Updates the Date Promised on the order head
    + * and updates any relevant sales orders if the date promised is updated on a
    + * purchase order.
    + *
    + */
    + @Override
    + public String modelChange(PO po, int type) throws Exception {
    +
    + MOrderLine orderLine = (MOrderLine)po;
    +
    + if ((type==ModelValidator.TYPE_BEFORE_CHANGE || type==ModelValidator.TYPE_BEFORE_NEW) &&
    + orderLine.getQtyOrdered().subtract(orderLine.getQtyDelivered()).signum()>0) {
    +
    + // Check if date promised updated is changed
    + java.sql.Timestamp ts1 = (java.sql.Timestamp)po.get_Value("DatePromisedUpdated");
    + java.sql.Timestamp ts2 = (java.sql.Timestamp)po.get_ValueOld("DatePromisedUpdated");
    +
    + if (ts2==null || !ts2.equals(ts1)) {
    +
    + MOrder order = (MOrder)orderLine.getC_Order();
    +
    + if (orderLine.isProcessed()) {  // Must be processed (completed order) to update sales orders
    + // Update
    + if (!order.isSOTrx()) {
    + // Purchase order
    + // Ask if process should be run (only in client mode)
    + if (Ini.isClient()) {
    + int result = JOptionPane.showConfirmDialog(null,
    + Msg.getMsg(po.getCtx(), "DatePromisedUpdatedQuestion"),
    + Msg.getElement(po.getCtx(), "DatePromisedUpdated") + "?",
    + JOptionPane.YES_NO_OPTION,
    + JOptionPane.QUESTION_MESSAGE);
    + if (result==JOptionPane.YES_OPTION) {
    + // Updating sales orders
    + // Call server process
    + runUpdateProcess(order, orderLine);
    +
    + }
    + }
    + }
    + }
    + // Update promised date on the order head
    + if (orderLine.getDatePromised().after(order.getDatePromised())) {
    + order.setDatePromised(orderLine.getDatePromised());
    + order.saveEx(po.get_TrxName());
    + }
    + }
    + }
    +
    + return null;
    + }
    +
    + /**
    + * Runs update process "DatePromisedUpdateProcess".
    + *
    + * @param order
    + * @param line
    + * @return
    + */
    + private boolean runUpdateProcess(MOrder order, MOrderLine line) {
    +
    + // Create instance parameters. I e the parameters you want to send to the process.
    + ProcessInfoParameter pi1 = new ProcessInfoParameter("C_BPartner_ID", order.getC_BPartner_ID(),"","","");
    + ProcessInfoParameter pi2 = new ProcessInfoParameter("M_Product_ID", line.getM_Product_ID(), "","","");
    + ProcessInfoParameter pi3 = new ProcessInfoParameter("DatePromised", line.getDatePromised(), "","","");
    + ProcessInfoParameter pi4 = new ProcessInfoParameter("DatePrecision", line.getDatePromisedPrecision(), "","","");
    + ProcessInfoParameter pi5 = new ProcessInfoParameter("Qty", line.getQtyOrdered().subtract(line.getQtyDelivered()), "","","");
    +
    + // Create a process info instance. This is a composite class containing the parameters.
    + ProcessInfo pi = new ProcessInfo("", 0,0,0);
    + pi.setParameter(new ProcessInfoParameter {pi1, pi2, pi3, pi4, pi5});
    +
    + // Lookup process in the AD, in this case by value
    + MProcess pr = new MProcess(Env.getCtx(), 53219, line.get_TrxName()); // DatePromisedUpdateProcess
    +
    + if (pr==null) {
    +       logger.warning("Process does not exist. ");
    +       return false;
    + }
    +
    + // Create process instance (mainly for logging/sync purpose)
    + MPInstance mpi = new MPInstance(Env.getCtx(), 0, null);
    + mpi.setAD_Process_ID(pr.get_ID());
    + mpi.setRecord_ID(line.get_ID());
    + mpi.save();
    +
    + // Connect the process to the process instance.
    + pi.setAD_PInstance_ID(mpi.get_ID());
    +
    + DatePromisedUpdateProcess process = new DatePromisedUpdateProcess();
    + boolean result = process.startProcess(line.getCtx(), pi, null);
    +
    + return(result);
    + }
    +
    +}
    Index: base/src/org/compiere/model/CalloutOrder.java
    ===================================================================
    -- base/src/org/compiere/model/CalloutOrder.java (revision 13069)
    +++ base/src/org/compiere/model/CalloutOrder.java (working copy)
    @@ -17,10 +17,12 @@
    package org.compiere.model;

    import java.math.BigDecimal;
    +import java.sql.CallableStatement;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Timestamp;
    +import java.sql.Types;
    import java.util.Properties;
    import java.util.logging.Level;

    @@ -766,10 +768,25 @@
    (M_Warehouse_ID, M_Product_ID.intValue(), M_AttributeSetInstance_ID, null);
    if (available == null)
    available = Env.ZERO;
    - if (available.signum() == 0)
    - mTab.fireDataStatusEEvent ("NoQtyAvailable", "0", false);
    - else if (available.compareTo(QtyOrdered) < 0)
    - mTab.fireDataStatusEEvent ("InsufficientQtyAvailable", available.toString(), false);
    + if (available.signum() == 0 || available.compareTo(QtyOrdered) < 0) {
    +
    + // Update promised date
    + java.sql.Timestamp promisedDate = new java.sql.Timestamp(0);
    + String promisedDatePrecision = getBestPromiseDate(product.get_ID(), promisedDate, M_Warehouse_ID, QtyOrdered.subtract(available));
    + if (promisedDatePrecision!=null) {
    + if (promisedDate!=null && promisedDate.getTime()>0) {
    + java.sql.Timestamp datePromised = new java.sql.Timestamp(promisedDate.getTime());
    + mTab.setValue("DatePromised", datePromised);
    + }
    + mTab.setValue("DatePromisedPrecision", promisedDatePrecision);
    + }
    + if (available.signum() == 0) {
    + mTab.fireDataStatusEEvent ("NoQtyAvailable", "0", false);
    + } else {
    + mTab.fireDataStatusEEvent ("InsufficientQtyAvailable", available.toString(), false);
    + }
    +
    + }
    else
    {
    Integer C_OrderLine_ID = (Integer)mTab.getValue("C_OrderLine_ID");
    @@ -797,6 +814,39 @@
    } // product

    /**
    + * Returns best promise date and precision for this product and quantity
    + *
    + * @param productId The id of the product
    + * @param promiseDate This must be a non-null parameter since the promise
    + * date is returned in this in parameter.
    + * @param qty The quantity we want to check
    + * @return Promise date precision. The promise date itself is passed in the
    + * in-parameter promiseDate (which must not be null).
    + */
    + public String getBestPromiseDate(int productId, java.sql.Timestamp promiseDate, int warehouseId, BigDecimal qty)  {
    +
    + try {
    + CallableStatement cs;
    + cs = DB.prepareCall("{call get_best_datepromised(?, ?, ?)}");
    + cs.setInt(1, productId);
    + cs.setInt(2, warehouseId);
    + cs.setBigDecimal(3, qty);
    + cs.registerOutParameter(1, Types.DATE);
    + cs.registerOutParameter(2, Types.CHAR);
    + cs.execute();
    + java.sql.Date returnDate = cs.getDate(1);
    + promiseDate.setTime(returnDate!=null ? returnDate.getTime() : 0);
    + String precision = cs.getString(2);
    + return(precision);
    + } catch (SQLException se) {
    + log.warning(se.getMessage());
    + return(null);
    + }
    +
    + }
    +
    +
    + /**
    * Order Line - Charge.
    * - updates PriceActual from Charge
    * - sets PriceLimit, PriceList to zero
    Index: base/src/org/compiere/model/CalloutOrderLine.java
    ===================================================================
    -- base/src/org/compiere/model/CalloutOrderLine.java (revision 0)
    +++ base/src/org/compiere/model/CalloutOrderLine.java (revision 0)
    @@ -0,0 +1,38 @@
    +package org.compiere.model;
    +
    +import java.math.BigDecimal;
    +import java.util.Calendar;
    +import java.util.Properties;
    +
    +public class CalloutOrderLine extends CalloutEngine {
    +
    + /**
    + * Updates Date Promised Updated field if order line is not fully delivered.
    + *
    + * @param ctx
    + * @param WindowNo
    + * @param mTab
    + * @param mField
    + * @param value
    + * @return
    + */
    + public String datePromised(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) {
    + if (isCalloutActive() || value == null)
    + return "";
    +
    + // Only do something if not all ordered are delivered
    + BigDecimal qtyOrdered = (BigDecimal)mTab.getValue("QtyOrdered");
    + BigDecimal qtyDelivered = (BigDecimal)mTab.getValue("QtyDelivered");
    + if (qtyOrdered.subtract(qtyDelivered).signum()<1) {
    + // Ordered less than Delivered. Do nothing.
    + return "";
    + }
    +
    + // Update DatePromisedUpdated
    + mTab.setValue("DatePromisedUpdated", new java.sql.Timestamp(Calendar.getInstance().getTimeInMillis()));
    +
    + return("");
    +
    + }
    +
    +}
    Index: base/src/org/compiere/model/I_C_OrderLine.java
    ===================================================================
    -- base/src/org/compiere/model/I_C_OrderLine.java (revision 13069)
    +++ base/src/org/compiere/model/I_C_OrderLine.java (working copy)
    @@ -88,7 +88,7 @@
      */
    public int getC_Activity_ID();

    - public I_C_Activity getC_Activity() throws RuntimeException;
    + public org.compiere.model.I_C_Activity getC_Activity() throws RuntimeException;

         /** Column name C_BPartner_ID */
         public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID";
    @@ -103,7 +103,7 @@
      */
    public int getC_BPartner_ID();

    - public I_C_BPartner getC_BPartner() throws RuntimeException;
    + public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException;

         /** Column name C_BPartner_Location_ID */
         public static final String COLUMNNAME_C_BPartner_Location_ID = "C_BPartner_Location_ID";
    @@ -118,7 +118,7 @@
      */
    public int getC_BPartner_Location_ID();

    - public I_C_BPartner_Location getC_BPartner_Location() throws RuntimeException;
    + public org.compiere.model.I_C_BPartner_Location getC_BPartner_Location() throws RuntimeException;

         /** Column name C_Campaign_ID */
         public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID";
    @@ -133,7 +133,7 @@
      */
    public int getC_Campaign_ID();

    - public I_C_Campaign getC_Campaign() throws RuntimeException;
    + public org.compiere.model.I_C_Campaign getC_Campaign() throws RuntimeException;

         /** Column name C_Charge_ID */
         public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID";
    @@ -148,7 +148,7 @@
      */
    public int getC_Charge_ID();

    - public I_C_Charge getC_Charge() throws RuntimeException;
    + public org.compiere.model.I_C_Charge getC_Charge() throws RuntimeException;

         /** Column name C_Currency_ID */
         public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
    @@ -163,7 +163,7 @@
      */
    public int getC_Currency_ID();

    - public I_C_Currency getC_Currency() throws RuntimeException;
    + public org.compiere.model.I_C_Currency getC_Currency() throws RuntimeException;

         /** Column name C_Order_ID */
         public static final String COLUMNNAME_C_Order_ID = "C_Order_ID";
    @@ -178,7 +178,7 @@
      */
    public int getC_Order_ID();

    - public I_C_Order getC_Order() throws RuntimeException;
    + public org.compiere.model.I_C_Order getC_Order() throws RuntimeException;

         /** Column name C_OrderLine_ID */
         public static final String COLUMNNAME_C_OrderLine_ID = "C_OrderLine_ID";
    @@ -206,7 +206,7 @@
      */
    public int getC_Project_ID();

    - public I_C_Project getC_Project() throws RuntimeException;
    + public org.compiere.model.I_C_Project getC_Project() throws RuntimeException;

         /** Column name C_ProjectPhase_ID */
         public static final String COLUMNNAME_C_ProjectPhase_ID = "C_ProjectPhase_ID";
    @@ -221,7 +221,7 @@
      */
    public int getC_ProjectPhase_ID();

    - public I_C_ProjectPhase getC_ProjectPhase() throws RuntimeException;
    + public org.compiere.model.I_C_ProjectPhase getC_ProjectPhase() throws RuntimeException;

         /** Column name C_ProjectTask_ID */
         public static final String COLUMNNAME_C_ProjectTask_ID = "C_ProjectTask_ID";
    @@ -236,7 +236,7 @@
      */
    public int getC_ProjectTask_ID();

    - public I_C_ProjectTask getC_ProjectTask() throws RuntimeException;
    + public org.compiere.model.I_C_ProjectTask getC_ProjectTask() throws RuntimeException;

         /** Column name Created */
         public static final String COLUMNNAME_Created = "Created";
    @@ -267,7 +267,7 @@
      */
    public int getC_Tax_ID();

    - public I_C_Tax getC_Tax() throws RuntimeException;
    + public org.compiere.model.I_C_Tax getC_Tax() throws RuntimeException;

         /** Column name C_UOM_ID */
         public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID";
    @@ -282,7 +282,7 @@
      */
    public int getC_UOM_ID();

    - public I_C_UOM getC_UOM() throws RuntimeException;
    + public org.compiere.model.I_C_UOM getC_UOM() throws RuntimeException;

         /** Column name DateDelivered */
         public static final String COLUMNNAME_DateDelivered = "DateDelivered";
    @@ -336,6 +336,32 @@
      */
    public Timestamp getDatePromised();

    +    /** Column name DatePromisedPrecision */
    +    public static final String COLUMNNAME_DatePromisedPrecision = "DatePromisedPrecision";
    +
    + /** Set Date Promised Precision.
    +   * Describes how exact the promised date is (date, week, part of month, month or unknown)
    +   */
    + public void setDatePromisedPrecision (String DatePromisedPrecision);
    +
    + /** Get Date Promised Precision.
    +   * Describes how exact the promised date is (date, week, part of month, month or unknown)
    +   */
    + public String getDatePromisedPrecision();
    +
    +    /** Column name DatePromisedUpdated */
    +    public static final String COLUMNNAME_DatePromisedUpdated = "DatePromisedUpdated";
    +
    + /** Set Date Promised Updated.
    +   * The date/time when the date promised date and/or date promised precision was updated.
    +   */
    + public void setDatePromisedUpdated (Timestamp DatePromisedUpdated);
    +
    + /** Get Date Promised Updated.
    +   * The date/time when the date promised date and/or date promised precision was updated.
    +   */
    + public Timestamp getDatePromisedUpdated();
    +
         /** Column name Description */
         public static final String COLUMNNAME_Description = "Description";

    @@ -440,7 +466,7 @@
      */
    public int getLink_OrderLine_ID();

    - public I_C_OrderLine getLink_OrderLine() throws RuntimeException;
    + public org.compiere.model.I_C_OrderLine getLink_OrderLine() throws RuntimeException;

         /** Column name M_AttributeSetInstance_ID */
         public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID";
    @@ -470,7 +496,7 @@
      */
    public int getM_Product_ID();

    - public I_M_Product getM_Product() throws RuntimeException;
    + public org.compiere.model.I_M_Product getM_Product() throws RuntimeException;

         /** Column name M_Promotion_ID */
         public static final String COLUMNNAME_M_Promotion_ID = "M_Promotion_ID";
    @@ -481,7 +507,7 @@
    /** Get Promotion   */
    public int getM_Promotion_ID();

    - public I_M_Promotion getM_Promotion() throws RuntimeException;
    + public org.compiere.model.I_M_Promotion getM_Promotion() throws RuntimeException;

         /** Column name M_Shipper_ID */
         public static final String COLUMNNAME_M_Shipper_ID = "M_Shipper_ID";
    @@ -496,7 +522,7 @@
      */
    public int getM_Shipper_ID();

    - public I_M_Shipper getM_Shipper() throws RuntimeException;
    + public org.compiere.model.I_M_Shipper getM_Shipper() throws RuntimeException;

         /** Column name M_Warehouse_ID */
         public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID";
    @@ -511,7 +537,7 @@
      */
    public int getM_Warehouse_ID();

    - public I_M_Warehouse getM_Warehouse() throws RuntimeException;
    + public org.compiere.model.I_M_Warehouse getM_Warehouse() throws RuntimeException;

         /** Column name PP_Cost_Collector_ID */
         public static final String COLUMNNAME_PP_Cost_Collector_ID = "PP_Cost_Collector_ID";
    @@ -706,7 +732,7 @@
      */
    public int getRef_OrderLine_ID();

    - public I_C_OrderLine getRef_OrderLine() throws RuntimeException;
    + public org.compiere.model.I_C_OrderLine getRef_OrderLine() throws RuntimeException;

         /** Column name RRAmt */
         public static final String COLUMNNAME_RRAmt = "RRAmt";
    @@ -776,7 +802,7 @@
      */
    public int getUser1_ID();

    - public I_C_ElementValue getUser1() throws RuntimeException;
    + public org.compiere.model.I_C_ElementValue getUser1() throws RuntimeException;

         /** Column name User2_ID */
         public static final String COLUMNNAME_User2_ID = "User2_ID";
    @@ -791,5 +817,5 @@
      */
    public int getUser2_ID();

    - public I_C_ElementValue getUser2() throws RuntimeException;
    + public org.compiere.model.I_C_ElementValue getUser2() throws RuntimeException;
    }
    Index: base/src/org/compiere/model/X_C_OrderLine.java
    ===================================================================
    -- base/src/org/compiere/model/X_C_OrderLine.java (revision 13069)
    +++ base/src/org/compiere/model/X_C_OrderLine.java (working copy)
    @@ -33,7 +33,7 @@
    /**
    *
    */
    - private static final long serialVersionUID = 20100622L;
    + private static final long serialVersionUID = 20100820L;

         /** Standard Constructor */
         public X_C_OrderLine (Properties ctx, int C_OrderLine_ID, String trxName)
    @@ -128,9 +128,9 @@
    return ii.intValue();
    }

    - public I_C_Activity getC_Activity() throws RuntimeException
    + public org.compiere.model.I_C_Activity getC_Activity() throws RuntimeException
         {
    - return (I_C_Activity)MTable.get(getCtx(), I_C_Activity.Table_Name)
    + return (org.compiere.model.I_C_Activity)MTable.get(getCtx(), org.compiere.model.I_C_Activity.Table_Name)
    .getPO(getC_Activity_ID(), get_TrxName()); }

    /** Set Activity.
    @@ -156,9 +156,9 @@
    return ii.intValue();
    }

    - public I_C_BPartner getC_BPartner() throws RuntimeException
    + public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
         {
    - return (I_C_BPartner)MTable.get(getCtx(), I_C_BPartner.Table_Name)
    + return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
    .getPO(getC_BPartner_ID(), get_TrxName()); }

    /** Set Business Partner .
    @@ -184,9 +184,9 @@
    return ii.intValue();
    }

    - public I_C_BPartner_Location getC_BPartner_Location() throws RuntimeException
    + public org.compiere.model.I_C_BPartner_Location getC_BPartner_Location() throws RuntimeException
         {
    - return (I_C_BPartner_Location)MTable.get(getCtx(), I_C_BPartner_Location.Table_Name)
    + return (org.compiere.model.I_C_BPartner_Location)MTable.get(getCtx(), org.compiere.model.I_C_BPartner_Location.Table_Name)
    .getPO(getC_BPartner_Location_ID(), get_TrxName()); }

    /** Set Partner Location.
    @@ -212,9 +212,9 @@
    return ii.intValue();
    }

    - public I_C_Campaign getC_Campaign() throws RuntimeException
    + public org.compiere.model.I_C_Campaign getC_Campaign() throws RuntimeException
         {
    - return (I_C_Campaign)MTable.get(getCtx(), I_C_Campaign.Table_Name)
    + return (org.compiere.model.I_C_Campaign)MTable.get(getCtx(), org.compiere.model.I_C_Campaign.Table_Name)
    .getPO(getC_Campaign_ID(), get_TrxName()); }

    /** Set Campaign.
    @@ -240,9 +240,9 @@
    return ii.intValue();
    }

    - public I_C_Charge getC_Charge() throws RuntimeException
    + public org.compiere.model.I_C_Charge getC_Charge() throws RuntimeException
         {
    - return (I_C_Charge)MTable.get(getCtx(), I_C_Charge.Table_Name)
    + return (org.compiere.model.I_C_Charge)MTable.get(getCtx(), org.compiere.model.I_C_Charge.Table_Name)
    .getPO(getC_Charge_ID(), get_TrxName()); }

    /** Set Charge.
    @@ -268,9 +268,9 @@
    return ii.intValue();
    }

    - public I_C_Currency getC_Currency() throws RuntimeException
    + public org.compiere.model.I_C_Currency getC_Currency() throws RuntimeException
         {
    - return (I_C_Currency)MTable.get(getCtx(), I_C_Currency.Table_Name)
    + return (org.compiere.model.I_C_Currency)MTable.get(getCtx(), org.compiere.model.I_C_Currency.Table_Name)
    .getPO(getC_Currency_ID(), get_TrxName()); }

    /** Set Currency.
    @@ -296,9 +296,9 @@
    return ii.intValue();
    }

    - public I_C_Order getC_Order() throws RuntimeException
    + public org.compiere.model.I_C_Order getC_Order() throws RuntimeException
         {
    - return (I_C_Order)MTable.get(getCtx(), I_C_Order.Table_Name)
    + return (org.compiere.model.I_C_Order)MTable.get(getCtx(), org.compiere.model.I_C_Order.Table_Name)
    .getPO(getC_Order_ID(), get_TrxName()); }

    /** Set Order.
    @@ -355,9 +355,9 @@
    return ii.intValue();
    }

    - public I_C_Project getC_Project() throws RuntimeException
    + public org.compiere.model.I_C_Project getC_Project() throws RuntimeException
         {
    - return (I_C_Project)MTable.get(getCtx(), I_C_Project.Table_Name)
    + return (org.compiere.model.I_C_Project)MTable.get(getCtx(), org.compiere.model.I_C_Project.Table_Name)
    .getPO(getC_Project_ID(), get_TrxName()); }

    /** Set Project.
    @@ -383,9 +383,9 @@
    return ii.intValue();
    }

    - public I_C_ProjectPhase getC_ProjectPhase() throws RuntimeException
    + public org.compiere.model.I_C_ProjectPhase getC_ProjectPhase() throws RuntimeException
         {
    - return (I_C_ProjectPhase)MTable.get(getCtx(), I_C_ProjectPhase.Table_Name)
    + return (org.compiere.model.I_C_ProjectPhase)MTable.get(getCtx(), org.compiere.model.I_C_ProjectPhase.Table_Name)
    .getPO(getC_ProjectPhase_ID(), get_TrxName()); }

    /** Set Project Phase.
    @@ -411,9 +411,9 @@
    return ii.intValue();
    }

    - public I_C_ProjectTask getC_ProjectTask() throws RuntimeException
    + public org.compiere.model.I_C_ProjectTask getC_ProjectTask() throws RuntimeException
         {
    - return (I_C_ProjectTask)MTable.get(getCtx(), I_C_ProjectTask.Table_Name)
    + return (org.compiere.model.I_C_ProjectTask)MTable.get(getCtx(), org.compiere.model.I_C_ProjectTask.Table_Name)
    .getPO(getC_ProjectTask_ID(), get_TrxName()); }

    /** Set Project Task.
    @@ -439,9 +439,9 @@
    return ii.intValue();
    }

    - public I_C_Tax getC_Tax() throws RuntimeException
    + public org.compiere.model.I_C_Tax getC_Tax() throws RuntimeException
         {
    - return (I_C_Tax)MTable.get(getCtx(), I_C_Tax.Table_Name)
    + return (org.compiere.model.I_C_Tax)MTable.get(getCtx(), org.compiere.model.I_C_Tax.Table_Name)
    .getPO(getC_Tax_ID(), get_TrxName()); }

    /** Set Tax.
    @@ -467,9 +467,9 @@
    return ii.intValue();
    }

    - public I_C_UOM getC_UOM() throws RuntimeException
    + public org.compiere.model.I_C_UOM getC_UOM() throws RuntimeException
         {
    - return (I_C_UOM)MTable.get(getCtx(), I_C_UOM.Table_Name)
    + return (org.compiere.model.I_C_UOM)MTable.get(getCtx(), org.compiere.model.I_C_UOM.Table_Name)
    .getPO(getC_UOM_ID(), get_TrxName()); }

    /** Set UOM.
    @@ -563,6 +563,53 @@
    return (Timestamp)get_Value(COLUMNNAME_DatePromised);
    }

    + /** DatePromisedPrecision AD_Reference_ID=53369 */
    + public static final int DATEPROMISEDPRECISION_AD_Reference_ID=53369;
    + /** On date = D */
    + public static final String DATEPROMISEDPRECISION_OnDate = "D";
    + /** Same week = W */
    + public static final String DATEPROMISEDPRECISION_SameWeek = "W";
    + /** Part of month = P */
    + public static final String DATEPROMISEDPRECISION_PartOfMonth = "P";
    + /** Same month = M */
    + public static final String DATEPROMISEDPRECISION_SameMonth = "M";
    + /** Unknown = U */
    + public static final String DATEPROMISEDPRECISION_Unknown = "U";
    + /** Set Date Promised Precision.
    + @param DatePromisedPrecision
    + Describes how exact the promised date is (date, week, part of month, month or unknown)
    +   */
    + public void setDatePromisedPrecision (String DatePromisedPrecision)
    + {
    +
    + set_Value (COLUMNNAME_DatePromisedPrecision, DatePromisedPrecision);
    + }
    +
    + /** Get Date Promised Precision.
    + @return Describes how exact the promised date is (date, week, part of month, month or unknown)
    +   */
    + public String getDatePromisedPrecision ()
    + {
    + return (String)get_Value(COLUMNNAME_DatePromisedPrecision);
    + }
    +
    + /** Set Date Promised Updated.
    + @param DatePromisedUpdated
    + The date/time when the date promised date and/or date promised precision was updated.
    +   */
    + public void setDatePromisedUpdated (Timestamp DatePromisedUpdated)
    + {
    + set_Value (COLUMNNAME_DatePromisedUpdated, DatePromisedUpdated);
    + }
    +
    + /** Get Date Promised Updated.
    + @return The date/time when the date promised date and/or date promised precision was updated.
    +   */
    + public Timestamp getDatePromisedUpdated ()
    + {
    + return (Timestamp)get_Value(COLUMNNAME_DatePromisedUpdated);
    + }
    +
    /** Set Description.
    @param Description
    Optional short description of the record
    @@ -684,9 +731,9 @@
    return bd;
    }

    - public I_C_OrderLine getLink_OrderLine() throws RuntimeException
    + public org.compiere.model.I_C_OrderLine getLink_OrderLine() throws RuntimeException
         {
    - return (I_C_OrderLine)MTable.get(getCtx(), I_C_OrderLine.Table_Name)
    + return (org.compiere.model.I_C_OrderLine)MTable.get(getCtx(), org.compiere.model.I_C_OrderLine.Table_Name)
    .getPO(getLink_OrderLine_ID(), get_TrxName()); }

    /** Set Linked Order Line.
    @@ -740,9 +787,9 @@
    return ii.intValue();
    }

    - public I_M_Product getM_Product() throws RuntimeException
    + public org.compiere.model.I_M_Product getM_Product() throws RuntimeException
         {
    - return (I_M_Product)MTable.get(getCtx(), I_M_Product.Table_Name)
    + return (org.compiere.model.I_M_Product)MTable.get(getCtx(), org.compiere.model.I_M_Product.Table_Name)
    .getPO(getM_Product_ID(), get_TrxName()); }

    /** Set Product.
    @@ -768,9 +815,9 @@
    return ii.intValue();
    }

    - public I_M_Promotion getM_Promotion() throws RuntimeException
    + public org.compiere.model.I_M_Promotion getM_Promotion() throws RuntimeException
         {
    - return (I_M_Promotion)MTable.get(getCtx(), I_M_Promotion.Table_Name)
    + return (org.compiere.model.I_M_Promotion)MTable.get(getCtx(), org.compiere.model.I_M_Promotion.Table_Name)
    .getPO(getM_Promotion_ID(), get_TrxName()); }

    /** Set Promotion.
    @@ -793,9 +840,9 @@
    return ii.intValue();
    }

    - public I_M_Shipper getM_Shipper() throws RuntimeException
    + public org.compiere.model.I_M_Shipper getM_Shipper() throws RuntimeException
         {
    - return (I_M_Shipper)MTable.get(getCtx(), I_M_Shipper.Table_Name)
    + return (org.compiere.model.I_M_Shipper)MTable.get(getCtx(), org.compiere.model.I_M_Shipper.Table_Name)
    .getPO(getM_Shipper_ID(), get_TrxName()); }

    /** Set Shipper.
    @@ -821,9 +868,9 @@
    return ii.intValue();
    }

    - public I_M_Warehouse getM_Warehouse() throws RuntimeException
    + public org.compiere.model.I_M_Warehouse getM_Warehouse() throws RuntimeException
         {
    - return (I_M_Warehouse)MTable.get(getCtx(), I_M_Warehouse.Table_Name)
    + return (org.compiere.model.I_M_Warehouse)MTable.get(getCtx(), org.compiere.model.I_M_Warehouse.Table_Name)
    .getPO(getM_Warehouse_ID(), get_TrxName()); }

    /** Set Warehouse.
    @@ -1138,9 +1185,9 @@
    return bd;
    }

    - public I_C_OrderLine getRef_OrderLine() throws RuntimeException
    + public org.compiere.model.I_C_OrderLine getRef_OrderLine() throws RuntimeException
         {
    - return (I_C_OrderLine)MTable.get(getCtx(), I_C_OrderLine.Table_Name)
    + return (org.compiere.model.I_C_OrderLine)MTable.get(getCtx(), org.compiere.model.I_C_OrderLine.Table_Name)
    .getPO(getRef_OrderLine_ID(), get_TrxName()); }

    /** Set Referenced Order Line.
    @@ -1226,9 +1273,9 @@
    return ii.intValue();
    }

    - public I_C_ElementValue getUser1() throws RuntimeException
    + public org.compiere.model.I_C_ElementValue getUser1() throws RuntimeException
         {
    - return (I_C_ElementValue)MTable.get(getCtx(), I_C_ElementValue.Table_Name)
    + return (org.compiere.model.I_C_ElementValue)MTable.get(getCtx(), org.compiere.model.I_C_ElementValue.Table_Name)
    .getPO(getUser1_ID(), get_TrxName()); }

    /** Set User List 1.
    @@ -1254,9 +1301,9 @@
    return ii.intValue();
    }

    - public I_C_ElementValue getUser2() throws RuntimeException
    + public org.compiere.model.I_C_ElementValue getUser2() throws RuntimeException
         {
    - return (I_C_ElementValue)MTable.get(getCtx(), I_C_ElementValue.Table_Name)
    + return (org.compiere.model.I_C_ElementValue)MTable.get(getCtx(), org.compiere.model.I_C_ElementValue.Table_Name)
    .getPO(getUser2_ID(), get_TrxName()); }

    /** Set User List 2.

    _

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks