src-wad/src/org/openbravo/wad/Fields_data.xsql
changeset 9910 6767429386d8
parent 9530 ee5bc772bdc7
equal deleted inserted replaced
9909:56a1306e07a0 9910:6767429386d8
    26     <Sql>
    26     <Sql>
    27       <![CDATA[
    27       <![CDATA[
    28       SELECT ad_column.ad_column_id as adColumnId, ad_column.ColumnName as realName, ad_column.ColumnName As Name, '' as NameRef, 
    28       SELECT ad_column.ad_column_id as adColumnId, ad_column.ColumnName as realName, ad_column.ColumnName As Name, '' as NameRef, 
    29         'x' as xmltext, ad_reference_id as reference, ad_reference_value_id as referencevalue,
    29         'x' as xmltext, ad_reference_id as reference, ad_reference_value_id as referencevalue,
    30         ismandatory as required, (CASE ad_field.isActive WHEN 'N' THEN 'N' ELSE isDisplayed END) as isdisplayed, isupdateable as isupdateable,
    30         ismandatory as required, (CASE ad_field.isActive WHEN 'N' THEN 'N' ELSE isDisplayed END) as isdisplayed, isupdateable as isupdateable,
    31         REPLACE(REPLACE(ad_column.defaultvalue, CHR(13), '\\n'), CHR(10), '') As defaultValue, 
    31         REPLACE(ad_column.defaultvalue, CHR(10), '') As defaultValue, 
    32         ad_column.fieldlength As fieldLength, 
    32         ad_column.fieldlength As fieldLength, 
    33         'Medio' as Text_Align, '' AS Xml_Format, 
    33         'Medio' as Text_Align, '' AS Xml_Format, 
    34         ad_field.displaylength, REPLACE(replace(REPLACE(REPLACE(AD_ELEMENT.columnname, 'Substitute_ID', 'M_Product_ID'), 'C_Settlement_Cancel_ID', 'C_Settlement_ID'), 'BOM_ID', '_ID'), 'M_LocatorTo_ID', 'M_Locator_ID') as columnname, 
    34         ad_field.displaylength, REPLACE(replace(REPLACE(REPLACE(AD_ELEMENT.columnname, 'Substitute_ID', 'M_Product_ID'), 'C_Settlement_Cancel_ID', 'C_Settlement_ID'), 'BOM_ID', '_ID'), 'M_LocatorTo_ID', 'M_Locator_ID') as columnname, 
    35         '' as WHERECLAUSE, ad_table.tablename, 'StringParameter' as Type, ad_column.ISSESSIONATTR, ad_column.iskey, 
    35         '' as WHERECLAUSE, ad_table.tablename, 'StringParameter' as Type, ad_column.ISSESSIONATTR, ad_column.iskey, 
    36         isParent, '' as ACCESSLEVEL, ad_field.isreadonly, '' as issecondarykey, ad_field.showInRelation, ad_field.isEncrypted,
    36         isParent, '' as ACCESSLEVEL, ad_field.isreadonly, '' as issecondarykey, ad_field.showInRelation, ad_field.isEncrypted,
   268     <SqlMethodComment>Default values of the columns</SqlMethodComment>
   268     <SqlMethodComment>Default values of the columns</SqlMethodComment>
   269     <Sql>
   269     <Sql>
   270       <![CDATA[
   270       <![CDATA[
   271       SELECT ad_column.AD_COLUMN_ID as adColumnId, ad_column.ISMANDATORY as required, 
   271       SELECT ad_column.AD_COLUMN_ID as adColumnId, ad_column.ISMANDATORY as required, 
   272       REPLACE(replace(REPLACE(REPLACE(columnname, 'Substitute_ID', 'M_Product_ID'), 'C_Settlement_Cancel_ID', 'C_Settlement_ID'), 'BOM_ID', '_ID'), 'M_LocatorTo_ID', 'M_Locator_ID') as Name, 
   272       REPLACE(replace(REPLACE(REPLACE(columnname, 'Substitute_ID', 'M_Product_ID'), 'C_Settlement_Cancel_ID', 'C_Settlement_ID'), 'BOM_ID', '_ID'), 'M_LocatorTo_ID', 'M_Locator_ID') as Name, 
   273       REPLACE(REPLACE(ad_column.defaultvalue, CHR(13), '\\n'), CHR(10), '') as defaultValue, '' as WHERECLAUSE, 
   273       REPLACE(ad_column.defaultvalue, CHR(10), '') as defaultValue, '' as WHERECLAUSE, 
   274       ad_reference_id as reference,
   274       ad_reference_id as reference,
   275       isdisplayed, ad_column.columnname as columnname, ad_table.ACCESSLEVEL, 
   275       isdisplayed, ad_column.columnname as columnname, ad_table.ACCESSLEVEL, 
   276       ad_table.TABLENAME as NameRef, ad_reference_value_id as referencevalue, ad_column.name as realname
   276       ad_table.TABLENAME as NameRef, ad_reference_value_id as referencevalue, ad_column.name as realname
   277       FROM ad_field, ad_column, ad_table
   277       FROM ad_field, ad_column, ad_table
   278       WHERE ad_field.ad_column_id = ad_column.ad_column_id
   278       WHERE ad_field.ad_column_id = ad_column.ad_column_id
   280         AND ad_tab_id = ? 
   280         AND ad_tab_id = ? 
   281         AND upper(ad_column.columnname) <> 'BINARYDATA'
   281         AND upper(ad_column.columnname) <> 'BINARYDATA'
   282       union
   282       union
   283       SELECT ad_column.AD_COLUMN_ID as reference, ad_column.ISMANDATORY as required, 
   283       SELECT ad_column.AD_COLUMN_ID as reference, ad_column.ISMANDATORY as required, 
   284       columnname as Name, 
   284       columnname as Name, 
   285       REPLACE(REPLACE(ad_column.defaultvalue, CHR(13), '\\n'), CHR(10), '') as defaultValue, '' as WHERECLAUSE, 
   285       REPLACE(ad_column.defaultvalue, CHR(10), '') as defaultValue, '' as WHERECLAUSE, 
   286       ad_reference_id as referencevalue,
   286       ad_reference_id as referencevalue,
   287       'Y', ad_column.columnname as columnname, ad_table.ACCESSLEVEL, 
   287       'Y', ad_column.columnname as columnname, ad_table.ACCESSLEVEL, 
   288       ad_table.TABLENAME as NameRef, ad_reference_value_id as type, ad_column.name as realname
   288       ad_table.TABLENAME as NameRef, ad_reference_value_id as type, ad_column.name as realname
   289       FROM ad_column, ad_table, ad_tab t
   289       FROM ad_column, ad_table, ad_tab t
   290       WHERE lower(columnname) in ('createdby', 'updatedby')
   290       WHERE lower(columnname) in ('createdby', 'updatedby')