<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ouyangzhaochang2663 $
    $Date: 2011/01/19 08:11:25 $ 
    $Revision: 1.4 $
    $Purpose: "岗位定义" 中上级岗位combobox用到的bm
-->
<ns1:model xmlns:ns1="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="op" extend="exp.exp_org_position" extendMode="reference">
    <ns1:fields>
        <ns1:field name="position_id"/>
        <ns1:field name="position_code" displayWidth="200" forDisplay="true" forQuery="true"/>
        <ns1:field name="description_id" multiLanguage="true" multiLanguageDescField="position_name"/>
        <ns1:field name="position_name" displayWidth="250" forDisplay="true" forQuery="true" prompt="EXP_ORG_POSITION.POSITION_NAME"/>
        <ns1:field name="parent_position_name_display" databaseType="VARCHAR2" datatype="java.lang.String" expression="(op.position_code || &apos;-&apos; || (select fd.description_text from fnd_descriptions fd where op.description_id=fd.description_id and fd.language=${/session/@lang}))"/>
    </ns1:fields>
    <ns1:data-filters>
        <ns1:data-filter name="company_id" enforceOperations="query" expression=" op.enabled_flag = &apos;Y&apos; and op.company_id = ${/session/@company_id}"/>
    </ns1:data-filters>
    <ns1:features>
        <f:multi-language-display/>
    </ns1:features>
    <ns1:query-fields>
        <ns1:query-field field="position_code" queryOperator="like"/>
        <ns1:query-field name="position_id" queryExpression="op.position_id != ${/parameter/@position_id}"/>
        <ns1:query-field field="position_name" queryexpression="exists (select 1 from fnd_descriptions fd where op.description_id=fd.description_id and fd.description_text like ${@position_name} and fd.language = ${/session/@lang})"/>
    </ns1:query-fields>
</ns1:model>
