Exemplo n.º 1
0
  @Override
  public void initialize(final ModelValidationEngine engine, final MClient client) {
    if (client != null) m_AD_Client_ID = client.getAD_Client_ID();

    engine.addModelChange(I_C_Order.Table_Name, this);
    engine.addDocValidate(I_C_Order.Table_Name, this);
  }
Exemplo n.º 2
0
  /**
   * Initialize Validation
   *
   * @param engine validation engine
   * @param client client
   */
  public void initialize(ModelValidationEngine engine, MClient client) {
    // client = null for global validator
    if (client != null) {
      m_AD_Client_ID = client.getAD_Client_ID();
      if (log.isLoggable(Level.INFO)) log.info(client.toString());
    } else {
      if (log.isLoggable(Level.INFO)) log.info("Initializing global validator: " + this.toString());
    }

    //	We want to be informed when C_Order is created/changed
    engine.addModelChange(MOrder.Table_Name, this);
    //	We want to validate Order before preparing
    engine.addDocValidate(MOrder.Table_Name, this);
  } //	initialize
Exemplo n.º 3
0
 @Override
 public void initialize(ModelValidationEngine engine, MClient client) {
   if (client != null) {
     ad_Client_ID = client.getAD_Client_ID();
   }
   engine.addModelChange(I_C_CountryArea_Assign.Table_Name, this);
 }
 public void initialize(ModelValidationEngine engine, MClient client) {
   if (client != null) {
     m_AD_Client_ID = client.getAD_Client_ID();
   }
   engine.addModelChange(MDDOrderLine.Table_Name, this);
   // engine.addDocValidate(MDDOrderLine.Table_Name, this);
   // engine.addDocValidate(MMovement.Table_Name, this);
 } //	initialize
Exemplo n.º 5
0
  @Override
  public void initialize(final ModelValidationEngine engine, final MClient client) {
    adClientId = client == null ? -1 : client.getAD_Client_ID();

    engine.addModelValidator(new C_Invoice(), client);
    engine.addModelValidator(new C_BPartner(), client);
    engine.addModelValidator(C_Order.INSTANCE, client);
    engine.addModelValidator(C_OrderLine.INSTANCE, client);
    engine.addModelValidator(new C_OLCand(), client);

    engine.addModelValidator(EDI_Desadv.INSTANCE, client);
    engine.addModelValidator(EDI_DesadvLine.INSTANCE, client);
    engine.addModelValidator(new M_InOut(), client);
    engine.addModelValidator(M_InOutLine.INSTANCE, client);

    engine.addModelValidator(new C_Invoice_Candidate(), client);

    // task 08926
    // invoice candidate listener

    final IInvoiceCandidateListeners invoiceCandidateListeners =
        Services.get(IInvoiceCandidateListeners.class);
    invoiceCandidateListeners.addListener(EdiInvoiceCandidateListener.instance);

    // task 08926
    // invoice copy handler

    Services.get(ICopyHandlerBL.class)
        .registerCopyHandler(
            org.compiere.model.I_C_Invoice.class,
            new IQueryFilter<
                Pair<org.compiere.model.I_C_Invoice, org.compiere.model.I_C_Invoice>>() {
              @Override
              public boolean accept(
                  Pair<org.compiere.model.I_C_Invoice, org.compiere.model.I_C_Invoice> model) {
                return true;
              }
            },
            new EdiInvoiceCopyHandler());
  }