Package com.debortoliwines.openerp.reporting.di

Examples of com.debortoliwines.openerp.reporting.di.OpenERPFieldInfo


    {
      final Object[] rowData = rows[row];

      for (int column = 0; column < selectedFields.size(); column++)
      {
        final OpenERPFieldInfo fld = selectedFields.get(column);

        // Base64 Decode Binary
        if (fld.getFieldType() == FieldType.BINARY
            && rowData[column] != null)
        {
          try
          {
            rowData[column] = Base64.decode(rowData[column].toString());
          }
          catch (DecodingException e)
          {
            rowData[column] = "Unable to decode string";
          }
          catch (Exception e)
          {
            logger.debug("Failed to decode string on query-result: Row=" + row + " Col=" + column, e);
          }
        }

        // Only return integer part (exclude name) from many2one field
        if (fld.getFieldType() == FieldType.MANY2ONE
            && rowData[column] instanceof Object[])
        {
          final Object[] value = (Object[]) rowData[column];
          rowData[column] = Integer.parseInt(String.valueOf(value[0]));
        }

        // make many2many and one2many a comma separated list of values
        if ((fld.getFieldType() == FieldType.MANY2MANY || fld.getFieldType() == FieldType.ONE2MANY)
            && rowData[column] instanceof Object[])
        {

          final StringBuilder stringValue = new StringBuilder();
          final Object[] mcolumn = (Object[]) rowData[column];
View Full Code Here


  }

  public OpenERPFieldInfo getField() {
 
    // Do the parent first because we need the parent for the modelPath to be accurate (And the unique lookup to work)
    OpenERPFieldInfo parentItem = null;
    if (parentReadHandler != null){
      parentItem = parentReadHandler.getField();
    }

    OpenERPFieldInfo field = new OpenERPFieldInfo(
        this.modelName,
        this.instanceNum,
        this.fieldName,
        this.renamedFieldName,
        parentItem,
View Full Code Here

TOP

Related Classes of com.debortoliwines.openerp.reporting.di.OpenERPFieldInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.