Fixed issue 20633.Add insert orphan line process in RFC.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Wed, 30 May 2012 15:46:09 +0200
changeset 16724 d674eb0e81dd
parent 16723 5f2f8cfff590
child 16725 fe3f4c2a8a74
Fixed issue 20633.Add insert orphan line process in RFC.
src-db/database/model/tables/C_ORDER.xml
src-db/database/model/views/C_RM_ORDER_PICK_EDIT_LINES.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_MESSAGE.xml
src-db/database/sourcedata/AD_MODEL_OBJECT.xml
src-db/database/sourcedata/AD_PROCESS.xml
src-db/database/sourcedata/AD_PROCESS_PARA.xml
src-db/database/sourcedata/AD_REFERENCE.xml
src-db/database/sourcedata/AD_REF_LIST.xml
src-db/database/sourcedata/OBUISEL_SELECTOR.xml
src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml
src/org/openbravo/common/actionhandler/SRMOPickEditLines.java
src/org/openbravo/erpCommon/ad_actionButton/RMInsertOrphanLine.java
src/org/openbravo/erpCommon/utility/OBMessageUtils.java
--- a/src-db/database/model/tables/C_ORDER.xml	Tue May 29 12:03:21 2012 +0200
+++ b/src-db/database/model/tables/C_ORDER.xml	Wed May 30 15:46:09 2012 +0200
@@ -293,6 +293,10 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="RM_ADDORPHANLINE" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="C_DOCTYPE" name="C_DOCTYPE_CORDER">
         <reference local="C_DOCTYPE_ID" foreign="C_DOCTYPE_ID"/>
       </foreign-key>
--- a/src-db/database/model/views/C_RM_ORDER_PICK_EDIT_LINES.xml	Tue May 29 12:03:21 2012 +0200
+++ b/src-db/database/model/views/C_RM_ORDER_PICK_EDIT_LINES.xml	Wed May 30 15:46:09 2012 +0200
@@ -4,13 +4,13 @@
 CASE
 WHEN rol.c_orderline_id IS NOT NULL THEN 'Y'
 ELSE 'N'
-END AS ob_selected, il.m_inoutline_id, rol.c_order_id AS returnorderid, i.documentno AS inoutno, i.movementdate, COALESCE(rol.m_product_id, il.m_product_id) AS m_product_id, COALESCE(rol.m_attributesetinstance_id, il.m_attributesetinstance_id) AS m_attributesetinstance_id, il.movementqty, COALESCE(rol.c_uom_id, il.c_uom_id) AS c_uom_id, (-1) * rol.qtyordered AS returned, COALESCE(rol.priceactual, ol.priceactual) AS priceactual, rol.c_return_reason_id, o.documentno AS orderno, COALESCE(rol.issotrx, i.issotrx) AS issotrx, (-1) * retol.returnedqty AS returnedqty, COALESCE(rol.c_bpartner_id, i.c_bpartner_id) AS c_bpartner_id
+END AS ob_selected, il.m_inoutline_id, rol.c_order_id AS returnorderid, i.documentno AS inoutno, i.movementdate, COALESCE(rol.m_product_id, il.m_product_id) AS m_product_id, COALESCE(rol.m_attributesetinstance_id, il.m_attributesetinstance_id) AS m_attributesetinstance_id, il.movementqty, COALESCE(rol.c_uom_id, il.c_uom_id) AS c_uom_id, (-1) * rol.qtyordered AS returned, COALESCE(rol.priceactual, ol.priceactual) AS priceactual, rol.c_return_reason_id, o.documentno AS orderno, COALESCE(rol.issotrx, i.issotrx) AS issotrx, (-1) * retol.returnedqty AS returnedqty, COALESCE(rol.c_bpartner_id, i.c_bpartner_id) AS c_bpartner_id, COALESCE(rol.c_tax_id, ol.c_tax_id) AS c_tax_id
 FROM m_inoutline il
 JOIN m_inout i ON il.m_inout_id = i.m_inout_id AND i.processed = 'Y' AND i.docstatus <> 'VO'
 JOIN c_doctype dt ON i.c_doctype_id = dt.c_doctype_id AND dt.isreturn = 'N'
 LEFT JOIN c_orderline ol ON il.c_orderline_id = ol.c_orderline_id
 LEFT JOIN c_order o ON ol.c_order_id = o.c_order_id
-FULL JOIN (SELECT ol2.c_orderline_id, ol2.ad_org_id, ol2.isactive, ol2.created, ol2.createdby, ol2.updated, ol2.updatedby, ol2.c_order_id, ol2.qtyordered, ol2.priceactual, ol2.c_return_reason_id, ol2.m_inoutline_id, o2.c_bpartner_id, o2.issotrx, o2.ad_client_id, ol2.m_product_id, ol2.m_attributesetinstance_id, ol2.c_uom_id
+FULL JOIN (SELECT ol2.c_orderline_id, ol2.ad_org_id, ol2.isactive, ol2.created, ol2.createdby, ol2.updated, ol2.updatedby, ol2.c_order_id, ol2.qtyordered, ol2.priceactual, ol2.c_return_reason_id, ol2.m_inoutline_id, o2.c_bpartner_id, o2.issotrx, o2.ad_client_id, ol2.m_product_id, ol2.m_attributesetinstance_id, ol2.c_uom_id, ol2.c_tax_id
 FROM c_orderline ol2
 JOIN c_order o2 ON ol2.c_order_id = o2.c_order_id AND o2.processed = 'N') rol ON rol.m_inoutline_id = il.m_inoutline_id
 LEFT JOIN (SELECT sum(ol3.qtyordered) AS returnedqty, ol3.m_inoutline_id
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Tue May 29 12:03:21 2012 +0200
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Wed May 30 15:46:09 2012 +0200
@@ -225628,6 +225628,41 @@
 <!--3958F2FE6BD54288B69FF3D175C19480-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--3958F2FE6BD54288B69FF3D175C19480--></AD_COLUMN>
 
+<!--398019882EF04B089E5AEB86B314DD73--><AD_COLUMN>
+<!--398019882EF04B089E5AEB86B314DD73-->  <AD_COLUMN_ID><![CDATA[398019882EF04B089E5AEB86B314DD73]]></AD_COLUMN_ID>
+<!--398019882EF04B089E5AEB86B314DD73-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--398019882EF04B089E5AEB86B314DD73-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--398019882EF04B089E5AEB86B314DD73-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--398019882EF04B089E5AEB86B314DD73-->  <NAME><![CDATA[Tax]]></NAME>
+<!--398019882EF04B089E5AEB86B314DD73-->  <DESCRIPTION><![CDATA[The percentage of money requested by the government for this specified product or transaction.]]></DESCRIPTION>
+<!--398019882EF04B089E5AEB86B314DD73-->  <HELP><![CDATA[The Tax indicates the type of tax for this document line.]]></HELP>
+<!--398019882EF04B089E5AEB86B314DD73-->  <COLUMNNAME><![CDATA[C_Tax_ID]]></COLUMNNAME>
+<!--398019882EF04B089E5AEB86B314DD73-->  <AD_TABLE_ID><![CDATA[38A7A1273EA34C93A0EA49CE77B6FB14]]></AD_TABLE_ID>
+<!--398019882EF04B089E5AEB86B314DD73-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--398019882EF04B089E5AEB86B314DD73-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--398019882EF04B089E5AEB86B314DD73-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--398019882EF04B089E5AEB86B314DD73-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--398019882EF04B089E5AEB86B314DD73-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--398019882EF04B089E5AEB86B314DD73-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--398019882EF04B089E5AEB86B314DD73-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--398019882EF04B089E5AEB86B314DD73-->  <SEQNO><![CDATA[260]]></SEQNO>
+<!--398019882EF04B089E5AEB86B314DD73-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--398019882EF04B089E5AEB86B314DD73-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--398019882EF04B089E5AEB86B314DD73-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--398019882EF04B089E5AEB86B314DD73-->  <AD_ELEMENT_ID><![CDATA[213]]></AD_ELEMENT_ID>
+<!--398019882EF04B089E5AEB86B314DD73-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--398019882EF04B089E5AEB86B314DD73-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--398019882EF04B089E5AEB86B314DD73-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--398019882EF04B089E5AEB86B314DD73-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--398019882EF04B089E5AEB86B314DD73-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--398019882EF04B089E5AEB86B314DD73-->  <POSITION><![CDATA[25]]></POSITION>
+<!--398019882EF04B089E5AEB86B314DD73-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--398019882EF04B089E5AEB86B314DD73-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--398019882EF04B089E5AEB86B314DD73-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--398019882EF04B089E5AEB86B314DD73-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--398019882EF04B089E5AEB86B314DD73-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--398019882EF04B089E5AEB86B314DD73--></AD_COLUMN>
+
 <!--3A2DB7BEE682477C8A06749FFCF25B26--><AD_COLUMN>
 <!--3A2DB7BEE682477C8A06749FFCF25B26-->  <AD_COLUMN_ID><![CDATA[3A2DB7BEE682477C8A06749FFCF25B26]]></AD_COLUMN_ID>
 <!--3A2DB7BEE682477C8A06749FFCF25B26-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -280528,7 +280563,7 @@
 <!--AF2B81F2F6CBCDB5E040007F01006F02-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--AF2B81F2F6CBCDB5E040007F01006F02-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--AF2B81F2F6CBCDB5E040007F01006F02-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--AF2B81F2F6CBCDB5E040007F01006F02-->  <POSITION><![CDATA[71]]></POSITION>
+<!--AF2B81F2F6CBCDB5E040007F01006F02-->  <POSITION><![CDATA[70]]></POSITION>
 <!--AF2B81F2F6CBCDB5E040007F01006F02-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--AF2B81F2F6CBCDB5E040007F01006F02-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--AF2B81F2F6CBCDB5E040007F01006F02-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -280562,7 +280597,7 @@
 <!--AF2B81F2F6CDCDB5E040007F01006F02-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--AF2B81F2F6CDCDB5E040007F01006F02-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--AF2B81F2F6CDCDB5E040007F01006F02-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--AF2B81F2F6CDCDB5E040007F01006F02-->  <POSITION><![CDATA[72]]></POSITION>
+<!--AF2B81F2F6CDCDB5E040007F01006F02-->  <POSITION><![CDATA[71]]></POSITION>
 <!--AF2B81F2F6CDCDB5E040007F01006F02-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--AF2B81F2F6CDCDB5E040007F01006F02-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--AF2B81F2F6CDCDB5E040007F01006F02-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -280596,7 +280631,7 @@
 <!--AF2B81F2F6CECDB5E040007F01006F02-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--AF2B81F2F6CECDB5E040007F01006F02-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--AF2B81F2F6CECDB5E040007F01006F02-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--AF2B81F2F6CECDB5E040007F01006F02-->  <POSITION><![CDATA[73]]></POSITION>
+<!--AF2B81F2F6CECDB5E040007F01006F02-->  <POSITION><![CDATA[72]]></POSITION>
 <!--AF2B81F2F6CECDB5E040007F01006F02-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--AF2B81F2F6CECDB5E040007F01006F02-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--AF2B81F2F6CECDB5E040007F01006F02-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -286197,7 +286232,7 @@
 <!--C66674DA045E47D1A50B3C5805326AB9-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--C66674DA045E47D1A50B3C5805326AB9-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--C66674DA045E47D1A50B3C5805326AB9-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--C66674DA045E47D1A50B3C5805326AB9-->  <POSITION><![CDATA[75]]></POSITION>
+<!--C66674DA045E47D1A50B3C5805326AB9-->  <POSITION><![CDATA[73]]></POSITION>
 <!--C66674DA045E47D1A50B3C5805326AB9-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--C66674DA045E47D1A50B3C5805326AB9-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--C66674DA045E47D1A50B3C5805326AB9-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -286692,6 +286727,40 @@
 <!--CC754B47555D4F66974371B151632F41-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--CC754B47555D4F66974371B151632F41--></AD_COLUMN>
 
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33--><AD_COLUMN>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <AD_COLUMN_ID><![CDATA[CCB0DDDAF34E4415B9DBEB51B4C36A33]]></AD_COLUMN_ID>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <NAME><![CDATA[RM_AddOrphanLine]]></NAME>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <COLUMNNAME><![CDATA[RM_AddOrphanLine]]></COLUMNNAME>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <AD_TABLE_ID><![CDATA[259]]></AD_TABLE_ID>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <AD_REFERENCE_ID><![CDATA[28]]></AD_REFERENCE_ID>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <SEQNO><![CDATA[600]]></SEQNO>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <AD_ELEMENT_ID><![CDATA[DB1DD8906C2F4881AC73CF445EDD2092]]></AD_ELEMENT_ID>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <AD_PROCESS_ID><![CDATA[23D1B163EC0B41F790CE39BF01DA320E]]></AD_PROCESS_ID>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <POSITION><![CDATA[74]]></POSITION>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--CCB0DDDAF34E4415B9DBEB51B4C36A33--></AD_COLUMN>
+
 <!--CD0B83BB40B443D9B807AD4C9AAEC31C--><AD_COLUMN>
 <!--CD0B83BB40B443D9B807AD4C9AAEC31C-->  <AD_COLUMN_ID><![CDATA[CD0B83BB40B443D9B807AD4C9AAEC31C]]></AD_COLUMN_ID>
 <!--CD0B83BB40B443D9B807AD4C9AAEC31C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Tue May 29 12:03:21 2012 +0200
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Wed May 30 15:46:09 2012 +0200
@@ -28423,6 +28423,18 @@
 <!--D6B8F4BF589745C2BFC0E41C36E47FDF-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--D6B8F4BF589745C2BFC0E41C36E47FDF--></AD_ELEMENT>
 
+<!--DB1DD8906C2F4881AC73CF445EDD2092--><AD_ELEMENT>
+<!--DB1DD8906C2F4881AC73CF445EDD2092-->  <AD_ELEMENT_ID><![CDATA[DB1DD8906C2F4881AC73CF445EDD2092]]></AD_ELEMENT_ID>
+<!--DB1DD8906C2F4881AC73CF445EDD2092-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--DB1DD8906C2F4881AC73CF445EDD2092-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--DB1DD8906C2F4881AC73CF445EDD2092-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--DB1DD8906C2F4881AC73CF445EDD2092-->  <COLUMNNAME><![CDATA[RM_AddOrphanLine]]></COLUMNNAME>
+<!--DB1DD8906C2F4881AC73CF445EDD2092-->  <NAME><![CDATA[RM_AddOrphanLine]]></NAME>
+<!--DB1DD8906C2F4881AC73CF445EDD2092-->  <PRINTNAME><![CDATA[RM_AddOrphanLine]]></PRINTNAME>
+<!--DB1DD8906C2F4881AC73CF445EDD2092-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--DB1DD8906C2F4881AC73CF445EDD2092-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--DB1DD8906C2F4881AC73CF445EDD2092--></AD_ELEMENT>
+
 <!--DBADCCC197DA42558F8CD6CE68530A20--><AD_ELEMENT>
 <!--DBADCCC197DA42558F8CD6CE68530A20-->  <AD_ELEMENT_ID><![CDATA[DBADCCC197DA42558F8CD6CE68530A20]]></AD_ELEMENT_ID>
 <!--DBADCCC197DA42558F8CD6CE68530A20-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Tue May 29 12:03:21 2012 +0200
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Wed May 30 15:46:09 2012 +0200
@@ -173510,6 +173510,32 @@
 <!--2CD5548FF8284700BBA81B2AA589E8AD-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--2CD5548FF8284700BBA81B2AA589E8AD--></AD_FIELD>
 
+<!--2CE499785CD9453F9AC1CDADE9B9092E--><AD_FIELD>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <AD_FIELD_ID><![CDATA[2CE499785CD9453F9AC1CDADE9B9092E]]></AD_FIELD_ID>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <NAME><![CDATA[Tax]]></NAME>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <DESCRIPTION><![CDATA[The percentage of money requested by the government for this specified product or transaction.]]></DESCRIPTION>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <HELP><![CDATA[The Tax indicates the type of tax for this document line.]]></HELP>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <AD_TAB_ID><![CDATA[CC35784EF36B4732B40167CD5D2449F0]]></AD_TAB_ID>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <AD_COLUMN_ID><![CDATA[398019882EF04B089E5AEB86B314DD73]]></AD_COLUMN_ID>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--2CE499785CD9453F9AC1CDADE9B9092E-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--2CE499785CD9453F9AC1CDADE9B9092E--></AD_FIELD>
+
 <!--2CF21F30B3B24EA489126EF4DDBD643E--><AD_FIELD>
 <!--2CF21F30B3B24EA489126EF4DDBD643E-->  <AD_FIELD_ID><![CDATA[2CF21F30B3B24EA489126EF4DDBD643E]]></AD_FIELD_ID>
 <!--2CF21F30B3B24EA489126EF4DDBD643E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -174003,6 +174029,35 @@
 <!--2FEF6105A08846E49172686C158532E0-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--2FEF6105A08846E49172686C158532E0--></AD_FIELD>
 
+<!--3059B4926EEA40D98D222B41C27336B0--><AD_FIELD>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <AD_FIELD_ID><![CDATA[3059B4926EEA40D98D222B41C27336B0]]></AD_FIELD_ID>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <NAME><![CDATA[Insert Orphan Line]]></NAME>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <DESCRIPTION><![CDATA[Process to insert orphan lines not related to shipments in return material orders]]></DESCRIPTION>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <HELP><![CDATA[Inserts a return order line not related to any shipment line. It has to be set the product with attribute if necessary and the quantity desired to return. Alternatively it can be set the price and tax to be used if values different than default are desired.]]></HELP>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <AD_TAB_ID><![CDATA[AF4090093CFF1431E040007F010048A5]]></AD_TAB_ID>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <AD_COLUMN_ID><![CDATA[CCB0DDDAF34E4415B9DBEB51B4C36A33]]></AD_COLUMN_ID>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <DISPLAYLOGIC><![CDATA[@Processed@='N' & @RMAllowOprhanLine@='Y']]></DISPLAYLOGIC>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <SEQNO><![CDATA[1]]></SEQNO>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <GRID_SEQNO><![CDATA[0]]></GRID_SEQNO>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--3059B4926EEA40D98D222B41C27336B0-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--3059B4926EEA40D98D222B41C27336B0--></AD_FIELD>
+
 <!--3070525AF044424EA4F0C5B0463E7A41--><AD_FIELD>
 <!--3070525AF044424EA4F0C5B0463E7A41-->  <AD_FIELD_ID><![CDATA[3070525AF044424EA4F0C5B0463E7A41]]></AD_FIELD_ID>
 <!--3070525AF044424EA4F0C5B0463E7A41-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MESSAGE.xml	Tue May 29 12:03:21 2012 +0200
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml	Wed May 30 15:46:09 2012 +0200
@@ -15213,6 +15213,17 @@
 <!--1F5BE473CE2740EC929AF597E3350FA9-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--1F5BE473CE2740EC929AF597E3350FA9--></AD_MESSAGE>
 
+<!--1FB12EC9B504421D923D13ABF982EC50--><AD_MESSAGE>
+<!--1FB12EC9B504421D923D13ABF982EC50-->  <AD_MESSAGE_ID><![CDATA[1FB12EC9B504421D923D13ABF982EC50]]></AD_MESSAGE_ID>
+<!--1FB12EC9B504421D923D13ABF982EC50-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1FB12EC9B504421D923D13ABF982EC50-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1FB12EC9B504421D923D13ABF982EC50-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1FB12EC9B504421D923D13ABF982EC50-->  <VALUE><![CDATA[WrongAttributeForProduct]]></VALUE>
+<!--1FB12EC9B504421D923D13ABF982EC50-->  <MSGTEXT><![CDATA[Chosen attribute value @attribute@ has not been used by product @product@. Please select another one.]]></MSGTEXT>
+<!--1FB12EC9B504421D923D13ABF982EC50-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--1FB12EC9B504421D923D13ABF982EC50-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1FB12EC9B504421D923D13ABF982EC50--></AD_MESSAGE>
+
 <!--1FBA26D3CE3F4C52B5B1EB2AA7E1C8D6--><AD_MESSAGE>
 <!--1FBA26D3CE3F4C52B5B1EB2AA7E1C8D6-->  <AD_MESSAGE_ID><![CDATA[1FBA26D3CE3F4C52B5B1EB2AA7E1C8D6]]></AD_MESSAGE_ID>
 <!--1FBA26D3CE3F4C52B5B1EB2AA7E1C8D6-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MODEL_OBJECT.xml	Tue May 29 12:03:21 2012 +0200
+++ b/src-db/database/sourcedata/AD_MODEL_OBJECT.xml	Wed May 30 15:46:09 2012 +0200
@@ -4088,6 +4088,18 @@
 <!--CBD971929B504D11A3164B58D8C69CBE-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
 <!--CBD971929B504D11A3164B58D8C69CBE--></AD_MODEL_OBJECT>
 
+<!--CCF91F382C84410688888FF601920FC8--><AD_MODEL_OBJECT>
+<!--CCF91F382C84410688888FF601920FC8-->  <AD_MODEL_OBJECT_ID><![CDATA[CCF91F382C84410688888FF601920FC8]]></AD_MODEL_OBJECT_ID>
+<!--CCF91F382C84410688888FF601920FC8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CCF91F382C84410688888FF601920FC8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CCF91F382C84410688888FF601920FC8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CCF91F382C84410688888FF601920FC8-->  <ACTION><![CDATA[P]]></ACTION>
+<!--CCF91F382C84410688888FF601920FC8-->  <CLASSNAME><![CDATA[org.openbravo.erpCommon.ad_actionButton.RMInsertOrphanLine]]></CLASSNAME>
+<!--CCF91F382C84410688888FF601920FC8-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
+<!--CCF91F382C84410688888FF601920FC8-->  <AD_PROCESS_ID><![CDATA[23D1B163EC0B41F790CE39BF01DA320E]]></AD_PROCESS_ID>
+<!--CCF91F382C84410688888FF601920FC8-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
+<!--CCF91F382C84410688888FF601920FC8--></AD_MODEL_OBJECT>
+
 <!--CD9445A64E6B435AA70BFF526289C69B--><AD_MODEL_OBJECT>
 <!--CD9445A64E6B435AA70BFF526289C69B-->  <AD_MODEL_OBJECT_ID><![CDATA[CD9445A64E6B435AA70BFF526289C69B]]></AD_MODEL_OBJECT_ID>
 <!--CD9445A64E6B435AA70BFF526289C69B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_PROCESS.xml	Tue May 29 12:03:21 2012 +0200
+++ b/src-db/database/sourcedata/AD_PROCESS.xml	Wed May 30 15:46:09 2012 +0200
@@ -5348,6 +5348,27 @@
 <!--0515E6559C31478E92703A3D10E6783B-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
 <!--0515E6559C31478E92703A3D10E6783B--></AD_PROCESS>
 
+<!--23D1B163EC0B41F790CE39BF01DA320E--><AD_PROCESS>
+<!--23D1B163EC0B41F790CE39BF01DA320E-->  <AD_PROCESS_ID><![CDATA[23D1B163EC0B41F790CE39BF01DA320E]]></AD_PROCESS_ID>
+<!--23D1B163EC0B41F790CE39BF01DA320E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--23D1B163EC0B41F790CE39BF01DA320E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--23D1B163EC0B41F790CE39BF01DA320E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--23D1B163EC0B41F790CE39BF01DA320E-->  <VALUE><![CDATA[RM_InsertOrphanLine]]></VALUE>
+<!--23D1B163EC0B41F790CE39BF01DA320E-->  <NAME><![CDATA[Insert Orphan Line]]></NAME>
+<!--23D1B163EC0B41F790CE39BF01DA320E-->  <DESCRIPTION><![CDATA[Process to insert orphan lines not related to shipments in return material orders]]></DESCRIPTION>
+<!--23D1B163EC0B41F790CE39BF01DA320E-->  <HELP><![CDATA[Inserts a return order line not related to any shipment line. It has to be set the product with attribute if necessary and the quantity desired to return. Alternatively it can be set the price and tax to be used if values different than default are desired.]]></HELP>
+<!--23D1B163EC0B41F790CE39BF01DA320E-->  <ACCESSLEVEL><![CDATA[1]]></ACCESSLEVEL>
+<!--23D1B163EC0B41F790CE39BF01DA320E-->  <ISUSERSTARTABLE><![CDATA[N]]></ISUSERSTARTABLE>
+<!--23D1B163EC0B41F790CE39BF01DA320E-->  <ISREPORT><![CDATA[N]]></ISREPORT>
+<!--23D1B163EC0B41F790CE39BF01DA320E-->  <ISDIRECTPRINT><![CDATA[N]]></ISDIRECTPRINT>
+<!--23D1B163EC0B41F790CE39BF01DA320E-->  <ISBACKGROUND><![CDATA[N]]></ISBACKGROUND>
+<!--23D1B163EC0B41F790CE39BF01DA320E-->  <ISJASPER><![CDATA[N]]></ISJASPER>
+<!--23D1B163EC0B41F790CE39BF01DA320E-->  <ISEXTERNALSERVICE><![CDATA[N]]></ISEXTERNALSERVICE>
+<!--23D1B163EC0B41F790CE39BF01DA320E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--23D1B163EC0B41F790CE39BF01DA320E-->  <UIPATTERN><![CDATA[S]]></UIPATTERN>
+<!--23D1B163EC0B41F790CE39BF01DA320E-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--23D1B163EC0B41F790CE39BF01DA320E--></AD_PROCESS>
+
 <!--4062D3F4448547C3A2BCDFB09D062BA2--><AD_PROCESS>
 <!--4062D3F4448547C3A2BCDFB09D062BA2-->  <AD_PROCESS_ID><![CDATA[4062D3F4448547C3A2BCDFB09D062BA2]]></AD_PROCESS_ID>
 <!--4062D3F4448547C3A2BCDFB09D062BA2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_PROCESS_PARA.xml	Tue May 29 12:03:21 2012 +0200
+++ b/src-db/database/sourcedata/AD_PROCESS_PARA.xml	Wed May 30 15:46:09 2012 +0200
@@ -4099,6 +4099,26 @@
 <!--3AC22B0F80264CF09D52044F198C75BD-->  <AD_ELEMENT_ID><![CDATA[193]]></AD_ELEMENT_ID>
 <!--3AC22B0F80264CF09D52044F198C75BD--></AD_PROCESS_PARA>
 
+<!--5DB8F1E894624135AA82694065D5B8FE--><AD_PROCESS_PARA>
+<!--5DB8F1E894624135AA82694065D5B8FE-->  <AD_PROCESS_PARA_ID><![CDATA[5DB8F1E894624135AA82694065D5B8FE]]></AD_PROCESS_PARA_ID>
+<!--5DB8F1E894624135AA82694065D5B8FE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5DB8F1E894624135AA82694065D5B8FE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5DB8F1E894624135AA82694065D5B8FE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5DB8F1E894624135AA82694065D5B8FE-->  <NAME><![CDATA[Tax]]></NAME>
+<!--5DB8F1E894624135AA82694065D5B8FE-->  <DESCRIPTION><![CDATA[The percentage of money requested by the government for this specified product or transaction.]]></DESCRIPTION>
+<!--5DB8F1E894624135AA82694065D5B8FE-->  <HELP><![CDATA[The Tax indicates the type of tax for this document line.]]></HELP>
+<!--5DB8F1E894624135AA82694065D5B8FE-->  <AD_PROCESS_ID><![CDATA[23D1B163EC0B41F790CE39BF01DA320E]]></AD_PROCESS_ID>
+<!--5DB8F1E894624135AA82694065D5B8FE-->  <SEQNO><![CDATA[50]]></SEQNO>
+<!--5DB8F1E894624135AA82694065D5B8FE-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--5DB8F1E894624135AA82694065D5B8FE-->  <AD_VAL_RULE_ID><![CDATA[299FA667CF374AC5ACC74739C3251134]]></AD_VAL_RULE_ID>
+<!--5DB8F1E894624135AA82694065D5B8FE-->  <COLUMNNAME><![CDATA[C_Tax_ID]]></COLUMNNAME>
+<!--5DB8F1E894624135AA82694065D5B8FE-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--5DB8F1E894624135AA82694065D5B8FE-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--5DB8F1E894624135AA82694065D5B8FE-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--5DB8F1E894624135AA82694065D5B8FE-->  <ISRANGE><![CDATA[N]]></ISRANGE>
+<!--5DB8F1E894624135AA82694065D5B8FE-->  <AD_ELEMENT_ID><![CDATA[213]]></AD_ELEMENT_ID>
+<!--5DB8F1E894624135AA82694065D5B8FE--></AD_PROCESS_PARA>
+
 <!--6E19A05CE9564C15BA5FAA118C005859--><AD_PROCESS_PARA>
 <!--6E19A05CE9564C15BA5FAA118C005859-->  <AD_PROCESS_PARA_ID><![CDATA[6E19A05CE9564C15BA5FAA118C005859]]></AD_PROCESS_PARA_ID>
 <!--6E19A05CE9564C15BA5FAA118C005859-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -4158,6 +4178,26 @@
 <!--7144D3B5D3254D118A501450DD94CC70-->  <AD_ELEMENT_ID><![CDATA[839]]></AD_ELEMENT_ID>
 <!--7144D3B5D3254D118A501450DD94CC70--></AD_PROCESS_PARA>
 
+<!--738981E2FB8A4CB9BCAB2629E799B00B--><AD_PROCESS_PARA>
+<!--738981E2FB8A4CB9BCAB2629E799B00B-->  <AD_PROCESS_PARA_ID><![CDATA[738981E2FB8A4CB9BCAB2629E799B00B]]></AD_PROCESS_PARA_ID>
+<!--738981E2FB8A4CB9BCAB2629E799B00B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--738981E2FB8A4CB9BCAB2629E799B00B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--738981E2FB8A4CB9BCAB2629E799B00B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--738981E2FB8A4CB9BCAB2629E799B00B-->  <NAME><![CDATA[Attribute Set Value]]></NAME>
+<!--738981E2FB8A4CB9BCAB2629E799B00B-->  <DESCRIPTION><![CDATA[An attribute associated with a product as part of an attribute set.]]></DESCRIPTION>
+<!--738981E2FB8A4CB9BCAB2629E799B00B-->  <HELP><![CDATA[The values of the actual Product Attributes]]></HELP>
+<!--738981E2FB8A4CB9BCAB2629E799B00B-->  <AD_PROCESS_ID><![CDATA[23D1B163EC0B41F790CE39BF01DA320E]]></AD_PROCESS_ID>
+<!--738981E2FB8A4CB9BCAB2629E799B00B-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--738981E2FB8A4CB9BCAB2629E799B00B-->  <AD_REFERENCE_ID><![CDATA[95E2A8B50A254B2AAE6774B8C2F28120]]></AD_REFERENCE_ID>
+<!--738981E2FB8A4CB9BCAB2629E799B00B-->  <AD_REFERENCE_VALUE_ID><![CDATA[A3AB4DB96AAF4F72B3D431282D49F1ED]]></AD_REFERENCE_VALUE_ID>
+<!--738981E2FB8A4CB9BCAB2629E799B00B-->  <COLUMNNAME><![CDATA[M_AttributeSetInstance_ID]]></COLUMNNAME>
+<!--738981E2FB8A4CB9BCAB2629E799B00B-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--738981E2FB8A4CB9BCAB2629E799B00B-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--738981E2FB8A4CB9BCAB2629E799B00B-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--738981E2FB8A4CB9BCAB2629E799B00B-->  <ISRANGE><![CDATA[N]]></ISRANGE>
+<!--738981E2FB8A4CB9BCAB2629E799B00B-->  <AD_ELEMENT_ID><![CDATA[2019]]></AD_ELEMENT_ID>
+<!--738981E2FB8A4CB9BCAB2629E799B00B--></AD_PROCESS_PARA>
+
 <!--73C3F0DC9B624A0BB72D5A5952FD8135--><AD_PROCESS_PARA>
 <!--73C3F0DC9B624A0BB72D5A5952FD8135-->  <AD_PROCESS_PARA_ID><![CDATA[73C3F0DC9B624A0BB72D5A5952FD8135]]></AD_PROCESS_PARA_ID>
 <!--73C3F0DC9B624A0BB72D5A5952FD8135-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -4237,6 +4277,25 @@
 <!--83BBC36B706642A39448DD2342B291F3-->  <AD_ELEMENT_ID><![CDATA[800632]]></AD_ELEMENT_ID>
 <!--83BBC36B706642A39448DD2342B291F3--></AD_PROCESS_PARA>
 
+<!--97266E0DF6A24EC0BC6845B9E305F307--><AD_PROCESS_PARA>
+<!--97266E0DF6A24EC0BC6845B9E305F307-->  <AD_PROCESS_PARA_ID><![CDATA[97266E0DF6A24EC0BC6845B9E305F307]]></AD_PROCESS_PARA_ID>
+<!--97266E0DF6A24EC0BC6845B9E305F307-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--97266E0DF6A24EC0BC6845B9E305F307-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--97266E0DF6A24EC0BC6845B9E305F307-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--97266E0DF6A24EC0BC6845B9E305F307-->  <NAME><![CDATA[Net Unit Price]]></NAME>
+<!--97266E0DF6A24EC0BC6845B9E305F307-->  <DESCRIPTION><![CDATA[The regular or normal price of a product in the respective price list.]]></DESCRIPTION>
+<!--97266E0DF6A24EC0BC6845B9E305F307-->  <HELP><![CDATA[The Standard Price indicates the standard or normal price for a product on this price list]]></HELP>
+<!--97266E0DF6A24EC0BC6845B9E305F307-->  <AD_PROCESS_ID><![CDATA[23D1B163EC0B41F790CE39BF01DA320E]]></AD_PROCESS_ID>
+<!--97266E0DF6A24EC0BC6845B9E305F307-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--97266E0DF6A24EC0BC6845B9E305F307-->  <AD_REFERENCE_ID><![CDATA[800008]]></AD_REFERENCE_ID>
+<!--97266E0DF6A24EC0BC6845B9E305F307-->  <COLUMNNAME><![CDATA[PriceStd]]></COLUMNNAME>
+<!--97266E0DF6A24EC0BC6845B9E305F307-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--97266E0DF6A24EC0BC6845B9E305F307-->  <FIELDLENGTH><![CDATA[10]]></FIELDLENGTH>
+<!--97266E0DF6A24EC0BC6845B9E305F307-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--97266E0DF6A24EC0BC6845B9E305F307-->  <ISRANGE><![CDATA[N]]></ISRANGE>
+<!--97266E0DF6A24EC0BC6845B9E305F307-->  <AD_ELEMENT_ID><![CDATA[957]]></AD_ELEMENT_ID>
+<!--97266E0DF6A24EC0BC6845B9E305F307--></AD_PROCESS_PARA>
+
 <!--A49C24DB7D4E423183D1C18CA79F4861--><AD_PROCESS_PARA>
 <!--A49C24DB7D4E423183D1C18CA79F4861-->  <AD_PROCESS_PARA_ID><![CDATA[A49C24DB7D4E423183D1C18CA79F4861]]></AD_PROCESS_PARA_ID>
 <!--A49C24DB7D4E423183D1C18CA79F4861-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -4258,6 +4317,26 @@
 <!--A49C24DB7D4E423183D1C18CA79F4861-->  <AD_ELEMENT_ID><![CDATA[181]]></AD_ELEMENT_ID>
 <!--A49C24DB7D4E423183D1C18CA79F4861--></AD_PROCESS_PARA>
 
+<!--A822BEFB7FB64D3C91F076748714CECE--><AD_PROCESS_PARA>
+<!--A822BEFB7FB64D3C91F076748714CECE-->  <AD_PROCESS_PARA_ID><![CDATA[A822BEFB7FB64D3C91F076748714CECE]]></AD_PROCESS_PARA_ID>
+<!--A822BEFB7FB64D3C91F076748714CECE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A822BEFB7FB64D3C91F076748714CECE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A822BEFB7FB64D3C91F076748714CECE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A822BEFB7FB64D3C91F076748714CECE-->  <NAME><![CDATA[Product]]></NAME>
+<!--A822BEFB7FB64D3C91F076748714CECE-->  <DESCRIPTION><![CDATA[An item produced by a process.]]></DESCRIPTION>
+<!--A822BEFB7FB64D3C91F076748714CECE-->  <HELP><![CDATA[Identifies an item which is either purchased or sold in this organization.]]></HELP>
+<!--A822BEFB7FB64D3C91F076748714CECE-->  <AD_PROCESS_ID><![CDATA[23D1B163EC0B41F790CE39BF01DA320E]]></AD_PROCESS_ID>
+<!--A822BEFB7FB64D3C91F076748714CECE-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--A822BEFB7FB64D3C91F076748714CECE-->  <AD_REFERENCE_ID><![CDATA[30]]></AD_REFERENCE_ID>
+<!--A822BEFB7FB64D3C91F076748714CECE-->  <AD_REFERENCE_VALUE_ID><![CDATA[800060]]></AD_REFERENCE_VALUE_ID>
+<!--A822BEFB7FB64D3C91F076748714CECE-->  <COLUMNNAME><![CDATA[M_Product_ID]]></COLUMNNAME>
+<!--A822BEFB7FB64D3C91F076748714CECE-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--A822BEFB7FB64D3C91F076748714CECE-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--A822BEFB7FB64D3C91F076748714CECE-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--A822BEFB7FB64D3C91F076748714CECE-->  <ISRANGE><![CDATA[N]]></ISRANGE>
+<!--A822BEFB7FB64D3C91F076748714CECE-->  <AD_ELEMENT_ID><![CDATA[454]]></AD_ELEMENT_ID>
+<!--A822BEFB7FB64D3C91F076748714CECE--></AD_PROCESS_PARA>
+
 <!--A88B1DDE069E49BE9AE84717B088156D--><AD_PROCESS_PARA>
 <!--A88B1DDE069E49BE9AE84717B088156D-->  <AD_PROCESS_PARA_ID><![CDATA[A88B1DDE069E49BE9AE84717B088156D]]></AD_PROCESS_PARA_ID>
 <!--A88B1DDE069E49BE9AE84717B088156D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -4296,6 +4375,23 @@
 <!--AC9ACA128F3B408A832EAEA1892AFE89-->  <AD_ELEMENT_ID><![CDATA[1367]]></AD_ELEMENT_ID>
 <!--AC9ACA128F3B408A832EAEA1892AFE89--></AD_PROCESS_PARA>
 
+<!--B4E1115D7500416CAA7ED85C1F491998--><AD_PROCESS_PARA>
+<!--B4E1115D7500416CAA7ED85C1F491998-->  <AD_PROCESS_PARA_ID><![CDATA[B4E1115D7500416CAA7ED85C1F491998]]></AD_PROCESS_PARA_ID>
+<!--B4E1115D7500416CAA7ED85C1F491998-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--B4E1115D7500416CAA7ED85C1F491998-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--B4E1115D7500416CAA7ED85C1F491998-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--B4E1115D7500416CAA7ED85C1F491998-->  <NAME><![CDATA[Return Reason]]></NAME>
+<!--B4E1115D7500416CAA7ED85C1F491998-->  <AD_PROCESS_ID><![CDATA[23D1B163EC0B41F790CE39BF01DA320E]]></AD_PROCESS_ID>
+<!--B4E1115D7500416CAA7ED85C1F491998-->  <SEQNO><![CDATA[60]]></SEQNO>
+<!--B4E1115D7500416CAA7ED85C1F491998-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--B4E1115D7500416CAA7ED85C1F491998-->  <COLUMNNAME><![CDATA[C_Return_Reason_ID]]></COLUMNNAME>
+<!--B4E1115D7500416CAA7ED85C1F491998-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--B4E1115D7500416CAA7ED85C1F491998-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--B4E1115D7500416CAA7ED85C1F491998-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--B4E1115D7500416CAA7ED85C1F491998-->  <ISRANGE><![CDATA[N]]></ISRANGE>
+<!--B4E1115D7500416CAA7ED85C1F491998-->  <AD_ELEMENT_ID><![CDATA[44CBD6E9427241D1B8052EC48012FC6C]]></AD_ELEMENT_ID>
+<!--B4E1115D7500416CAA7ED85C1F491998--></AD_PROCESS_PARA>
+
 <!--B8F7FEBD957D4215A414BF284D739C83--><AD_PROCESS_PARA>
 <!--B8F7FEBD957D4215A414BF284D739C83-->  <AD_PROCESS_PARA_ID><![CDATA[B8F7FEBD957D4215A414BF284D739C83]]></AD_PROCESS_PARA_ID>
 <!--B8F7FEBD957D4215A414BF284D739C83-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -4394,6 +4490,25 @@
 <!--DD67C43EBCE14230AC3F04A2904231EB-->  <AD_ELEMENT_ID><![CDATA[1002100005]]></AD_ELEMENT_ID>
 <!--DD67C43EBCE14230AC3F04A2904231EB--></AD_PROCESS_PARA>
 
+<!--E15C3460969D4583BD954308E715C5D4--><AD_PROCESS_PARA>
+<!--E15C3460969D4583BD954308E715C5D4-->  <AD_PROCESS_PARA_ID><![CDATA[E15C3460969D4583BD954308E715C5D4]]></AD_PROCESS_PARA_ID>
+<!--E15C3460969D4583BD954308E715C5D4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E15C3460969D4583BD954308E715C5D4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E15C3460969D4583BD954308E715C5D4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E15C3460969D4583BD954308E715C5D4-->  <NAME><![CDATA[Returned]]></NAME>
+<!--E15C3460969D4583BD954308E715C5D4-->  <DESCRIPTION><![CDATA[Returned]]></DESCRIPTION>
+<!--E15C3460969D4583BD954308E715C5D4-->  <HELP><![CDATA[If it is checked means that the debt/payment has been returned by the bank.]]></HELP>
+<!--E15C3460969D4583BD954308E715C5D4-->  <AD_PROCESS_ID><![CDATA[23D1B163EC0B41F790CE39BF01DA320E]]></AD_PROCESS_ID>
+<!--E15C3460969D4583BD954308E715C5D4-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--E15C3460969D4583BD954308E715C5D4-->  <AD_REFERENCE_ID><![CDATA[29]]></AD_REFERENCE_ID>
+<!--E15C3460969D4583BD954308E715C5D4-->  <COLUMNNAME><![CDATA[Returned]]></COLUMNNAME>
+<!--E15C3460969D4583BD954308E715C5D4-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--E15C3460969D4583BD954308E715C5D4-->  <FIELDLENGTH><![CDATA[10]]></FIELDLENGTH>
+<!--E15C3460969D4583BD954308E715C5D4-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--E15C3460969D4583BD954308E715C5D4-->  <ISRANGE><![CDATA[N]]></ISRANGE>
+<!--E15C3460969D4583BD954308E715C5D4-->  <AD_ELEMENT_ID><![CDATA[800653]]></AD_ELEMENT_ID>
+<!--E15C3460969D4583BD954308E715C5D4--></AD_PROCESS_PARA>
+
 <!--F6C130E3B2DD4414A162FC6BA4F2808E--><AD_PROCESS_PARA>
 <!--F6C130E3B2DD4414A162FC6BA4F2808E-->  <AD_PROCESS_PARA_ID><![CDATA[F6C130E3B2DD4414A162FC6BA4F2808E]]></AD_PROCESS_PARA_ID>
 <!--F6C130E3B2DD4414A162FC6BA4F2808E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_REFERENCE.xml	Tue May 29 12:03:21 2012 +0200
+++ b/src-db/database/sourcedata/AD_REFERENCE.xml	Wed May 30 15:46:09 2012 +0200
@@ -4828,6 +4828,19 @@
 <!--A26BA480E2014707B47257024C3CBFF7-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
 <!--A26BA480E2014707B47257024C3CBFF7--></AD_REFERENCE>
 
+<!--A3AB4DB96AAF4F72B3D431282D49F1ED--><AD_REFERENCE>
+<!--A3AB4DB96AAF4F72B3D431282D49F1ED-->  <AD_REFERENCE_ID><![CDATA[A3AB4DB96AAF4F72B3D431282D49F1ED]]></AD_REFERENCE_ID>
+<!--A3AB4DB96AAF4F72B3D431282D49F1ED-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A3AB4DB96AAF4F72B3D431282D49F1ED-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A3AB4DB96AAF4F72B3D431282D49F1ED-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A3AB4DB96AAF4F72B3D431282D49F1ED-->  <NAME><![CDATA[Product Attribute Selector]]></NAME>
+<!--A3AB4DB96AAF4F72B3D431282D49F1ED-->  <HELP><![CDATA[Selector of attribute instance used by selected attribute.]]></HELP>
+<!--A3AB4DB96AAF4F72B3D431282D49F1ED-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--A3AB4DB96AAF4F72B3D431282D49F1ED-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--A3AB4DB96AAF4F72B3D431282D49F1ED-->  <PARENTREFERENCE_ID><![CDATA[95E2A8B50A254B2AAE6774B8C2F28120]]></PARENTREFERENCE_ID>
+<!--A3AB4DB96AAF4F72B3D431282D49F1ED-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
+<!--A3AB4DB96AAF4F72B3D431282D49F1ED--></AD_REFERENCE>
+
 <!--A6BDFA712FF948CE903C4C463E832FC1--><AD_REFERENCE>
 <!--A6BDFA712FF948CE903C4C463E832FC1-->  <AD_REFERENCE_ID><![CDATA[A6BDFA712FF948CE903C4C463E832FC1]]></AD_REFERENCE_ID>
 <!--A6BDFA712FF948CE903C4C463E832FC1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_REF_LIST.xml	Tue May 29 12:03:21 2012 +0200
+++ b/src-db/database/sourcedata/AD_REF_LIST.xml	Wed May 30 15:46:09 2012 +0200
@@ -10355,6 +10355,17 @@
 <!--D7C4C4C31F0C4C8891E7D5AF68684561-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--D7C4C4C31F0C4C8891E7D5AF68684561--></AD_REF_LIST>
 
+<!--D8275C302BB6412B8A5BFF66AC97642F--><AD_REF_LIST>
+<!--D8275C302BB6412B8A5BFF66AC97642F-->  <AD_REF_LIST_ID><![CDATA[D8275C302BB6412B8A5BFF66AC97642F]]></AD_REF_LIST_ID>
+<!--D8275C302BB6412B8A5BFF66AC97642F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D8275C302BB6412B8A5BFF66AC97642F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D8275C302BB6412B8A5BFF66AC97642F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D8275C302BB6412B8A5BFF66AC97642F-->  <VALUE><![CDATA[RMAllowOprhanLine]]></VALUE>
+<!--D8275C302BB6412B8A5BFF66AC97642F-->  <NAME><![CDATA[RM Allow Orphan Line]]></NAME>
+<!--D8275C302BB6412B8A5BFF66AC97642F-->  <AD_REFERENCE_ID><![CDATA[A26BA480E2014707B47257024C3CBFF7]]></AD_REFERENCE_ID>
+<!--D8275C302BB6412B8A5BFF66AC97642F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--D8275C302BB6412B8A5BFF66AC97642F--></AD_REF_LIST>
+
 <!--D832F22185A0419F875AF44B6E68A2B1--><AD_REF_LIST>
 <!--D832F22185A0419F875AF44B6E68A2B1-->  <AD_REF_LIST_ID><![CDATA[D832F22185A0419F875AF44B6E68A2B1]]></AD_REF_LIST_ID>
 <!--D832F22185A0419F875AF44B6E68A2B1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Tue May 29 12:03:21 2012 +0200
+++ b/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Wed May 30 15:46:09 2012 +0200
@@ -1,5 +1,28 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <data>
+<!--225A4BD46912482EAF399C83C6564E08--><OBUISEL_SELECTOR>
+<!--225A4BD46912482EAF399C83C6564E08-->  <OBUISEL_SELECTOR_ID><![CDATA[225A4BD46912482EAF399C83C6564E08]]></OBUISEL_SELECTOR_ID>
+<!--225A4BD46912482EAF399C83C6564E08-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--225A4BD46912482EAF399C83C6564E08-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--225A4BD46912482EAF399C83C6564E08-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--225A4BD46912482EAF399C83C6564E08-->  <NAME><![CDATA[Product Attribute]]></NAME>
+<!--225A4BD46912482EAF399C83C6564E08-->  <AD_REFERENCE_ID><![CDATA[A3AB4DB96AAF4F72B3D431282D49F1ED]]></AD_REFERENCE_ID>
+<!--225A4BD46912482EAF399C83C6564E08-->  <AD_TABLE_ID><![CDATA[559]]></AD_TABLE_ID>
+<!--225A4BD46912482EAF399C83C6564E08-->  <FILTER_EXPRESSION><![CDATA[if (OB.getParameters().get('inpmProductId') != null) { "trx.product.id = '" +OB.getParameters().get('inpmProductId') +"'" } else { "1=2" }]]></FILTER_EXPRESSION>
+<!--225A4BD46912482EAF399C83C6564E08-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
+<!--225A4BD46912482EAF399C83C6564E08-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--225A4BD46912482EAF399C83C6564E08-->  <VALUEFIELD_ID><![CDATA[D1C291E19F1D40E4B74C14445B9F3E64]]></VALUEFIELD_ID>
+<!--225A4BD46912482EAF399C83C6564E08-->  <DISPLAYFIELD_ID><![CDATA[6F78BC009EFF4AC29A5F0F74DD1D8C19]]></DISPLAYFIELD_ID>
+<!--225A4BD46912482EAF399C83C6564E08-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
+<!--225A4BD46912482EAF399C83C6564E08-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--225A4BD46912482EAF399C83C6564E08-->  <HQL><![CDATA[SELECT DISTINCT asi.id AS asiid, CASE asi.id WHEN '0' THEN '--' ELSE asi.description END AS asiname
+FROM MaterialMgmtMaterialTransaction trx
+JOIN trx.attributeSetValue asi
+WHERE @additional_filters@]]></HQL>
+<!--225A4BD46912482EAF399C83C6564E08-->  <ENTITY_ALIAS><![CDATA[asi]]></ENTITY_ALIAS>
+<!--225A4BD46912482EAF399C83C6564E08-->  <CUSTOM_QUERY><![CDATA[Y]]></CUSTOM_QUERY>
+<!--225A4BD46912482EAF399C83C6564E08--></OBUISEL_SELECTOR>
+
 <!--2E64F551C7C4470C80C29DBA24B34A5F--><OBUISEL_SELECTOR>
 <!--2E64F551C7C4470C80C29DBA24B34A5F-->  <OBUISEL_SELECTOR_ID><![CDATA[2E64F551C7C4470C80C29DBA24B34A5F]]></OBUISEL_SELECTOR_ID>
 <!--2E64F551C7C4470C80C29DBA24B34A5F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml	Tue May 29 12:03:21 2012 +0200
+++ b/src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml	Wed May 30 15:46:09 2012 +0200
@@ -488,6 +488,26 @@
 <!--6EE86F97BE094992BC832846CCB9093D-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--6EE86F97BE094992BC832846CCB9093D--></OBUISEL_SELECTOR_FIELD>
 
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19--><OBUISEL_SELECTOR_FIELD>
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[6F78BC009EFF4AC29A5F0F74DD1D8C19]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19-->  <OBUISEL_SELECTOR_ID><![CDATA[225A4BD46912482EAF399C83C6564E08]]></OBUISEL_SELECTOR_ID>
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19-->  <NAME><![CDATA[Description]]></NAME>
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19-->  <SORT><![CDATA[Y]]></SORT>
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19-->  <SEARCHINSUGGESTIONBOX><![CDATA[Y]]></SEARCHINSUGGESTIONBOX>
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19-->  <SHOWINGRID><![CDATA[N]]></SHOWINGRID>
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19-->  <SORTNO><![CDATA[0]]></SORTNO>
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19-->  <DISPLAY_EXPRESSION><![CDATA[asiname]]></DISPLAY_EXPRESSION>
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19-->  <SHOWINPICKLIST><![CDATA[Y]]></SHOWINPICKLIST>
+<!--6F78BC009EFF4AC29A5F0F74DD1D8C19--></OBUISEL_SELECTOR_FIELD>
+
 <!--7167B12683FD4B8C99FA777C92A39BC5--><OBUISEL_SELECTOR_FIELD>
 <!--7167B12683FD4B8C99FA777C92A39BC5-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[7167B12683FD4B8C99FA777C92A39BC5]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--7167B12683FD4B8C99FA777C92A39BC5-->  <OBUISEL_SELECTOR_ID><![CDATA[4C8BC3E8E56441F4B8C98C684A0C9212]]></OBUISEL_SELECTOR_ID>
@@ -883,6 +903,26 @@
 <!--CD0E2A0608A24055BAE8B765AF211846-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--CD0E2A0608A24055BAE8B765AF211846--></OBUISEL_SELECTOR_FIELD>
 
+<!--D1C291E19F1D40E4B74C14445B9F3E64--><OBUISEL_SELECTOR_FIELD>
+<!--D1C291E19F1D40E4B74C14445B9F3E64-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[D1C291E19F1D40E4B74C14445B9F3E64]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--D1C291E19F1D40E4B74C14445B9F3E64-->  <OBUISEL_SELECTOR_ID><![CDATA[225A4BD46912482EAF399C83C6564E08]]></OBUISEL_SELECTOR_ID>
+<!--D1C291E19F1D40E4B74C14445B9F3E64-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D1C291E19F1D40E4B74C14445B9F3E64-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D1C291E19F1D40E4B74C14445B9F3E64-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--D1C291E19F1D40E4B74C14445B9F3E64-->  <NAME><![CDATA[Id]]></NAME>
+<!--D1C291E19F1D40E4B74C14445B9F3E64-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
+<!--D1C291E19F1D40E4B74C14445B9F3E64-->  <SORT><![CDATA[Y]]></SORT>
+<!--D1C291E19F1D40E4B74C14445B9F3E64-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--D1C291E19F1D40E4B74C14445B9F3E64-->  <SEARCHINSUGGESTIONBOX><![CDATA[N]]></SEARCHINSUGGESTIONBOX>
+<!--D1C291E19F1D40E4B74C14445B9F3E64-->  <SHOWINGRID><![CDATA[N]]></SHOWINGRID>
+<!--D1C291E19F1D40E4B74C14445B9F3E64-->  <SORTNO><![CDATA[0]]></SORTNO>
+<!--D1C291E19F1D40E4B74C14445B9F3E64-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D1C291E19F1D40E4B74C14445B9F3E64-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
+<!--D1C291E19F1D40E4B74C14445B9F3E64-->  <DISPLAY_EXPRESSION><![CDATA[asiid]]></DISPLAY_EXPRESSION>
+<!--D1C291E19F1D40E4B74C14445B9F3E64-->  <AD_REFERENCE_ID><![CDATA[13]]></AD_REFERENCE_ID>
+<!--D1C291E19F1D40E4B74C14445B9F3E64-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--D1C291E19F1D40E4B74C14445B9F3E64--></OBUISEL_SELECTOR_FIELD>
+
 <!--D2331E1502BD481A920747C46865FFA8--><OBUISEL_SELECTOR_FIELD>
 <!--D2331E1502BD481A920747C46865FFA8-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[D2331E1502BD481A920747C46865FFA8]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--D2331E1502BD481A920747C46865FFA8-->  <OBUISEL_SELECTOR_ID><![CDATA[4C8BC3E8E56441F4B8C98C684A0C9212]]></OBUISEL_SELECTOR_ID>
--- a/src/org/openbravo/common/actionhandler/SRMOPickEditLines.java	Tue May 29 12:03:21 2012 +0200
+++ b/src/org/openbravo/common/actionhandler/SRMOPickEditLines.java	Wed May 30 15:46:09 2012 +0200
@@ -157,7 +157,7 @@
       // Price
       HashMap<String, BigDecimal> prices = null;
 
-      if (selectedLine.get("orderNo").equals(null)) {
+      if (shipmentLine == null || shipmentLine.getSalesOrderLine() == null) {
         if (selectedLine.get("unitPrice").equals(null)) {
           prices = getPrices(strOrderId, product.getId(), newOrderLine.getOrderDate(), isSOTrx);
           newOrderLine.setUnitPrice((BigDecimal) prices.get("unitPrice"));
@@ -172,23 +172,25 @@
           newOrderLine.setStandardPrice(price);
         }
         // tax
-        List<Object> parameters = new ArrayList<Object>();
+        String taxId = selectedLine.getString("tax");
+        if (taxId == null) {
+          List<Object> parameters = new ArrayList<Object>();
 
-        parameters.add(product.getId());
-        parameters.add(order.getOrderDate());
-        parameters.add(order.getOrganization().getId());
-        parameters.add(order.getWarehouse().getId());
-        parameters.add(order.getPartnerAddress().getId());
-        parameters.add(order.getInvoiceAddress().getId());
-        if (order.getProject() != null) {
-          parameters.add(order.getProject().getId());
-        } else {
-          parameters.add(null);
+          parameters.add(product.getId());
+          parameters.add(order.getOrderDate());
+          parameters.add(order.getOrganization().getId());
+          parameters.add(order.getWarehouse().getId());
+          parameters.add(order.getPartnerAddress().getId());
+          parameters.add(order.getInvoiceAddress().getId());
+          if (order.getProject() != null) {
+            parameters.add(order.getProject().getId());
+          } else {
+            parameters.add(null);
+          }
+          parameters.add("Y");
+
+          taxId = (String) CallStoredProcedure.getInstance().call("C_Gettax", parameters, null);
         }
-        parameters.add("Y");
-
-        String taxId = (String) CallStoredProcedure.getInstance()
-            .call("C_Gettax", parameters, null);
         TaxRate tax = OBDal.getInstance().get(TaxRate.class, taxId);
 
         newOrderLine.setTax(tax);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_actionButton/RMInsertOrphanLine.java	Wed May 30 15:46:09 2012 +0200
@@ -0,0 +1,225 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SLU 
+ * All portions are Copyright (C) 2012 Openbravo SLU 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.erpCommon.ad_actionButton;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.openbravo.base.exception.OBException;
+import org.openbravo.base.provider.OBProvider;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.dal.service.OBQuery;
+import org.openbravo.database.ConnectionProvider;
+import org.openbravo.erpCommon.utility.OBDateUtils;
+import org.openbravo.erpCommon.utility.OBError;
+import org.openbravo.erpCommon.utility.OBMessageUtils;
+import org.openbravo.model.common.order.Order;
+import org.openbravo.model.common.order.OrderLine;
+import org.openbravo.model.common.order.ReturnReason;
+import org.openbravo.model.common.plm.AttributeSetInstance;
+import org.openbravo.model.common.plm.Product;
+import org.openbravo.model.financialmgmt.tax.TaxRate;
+import org.openbravo.model.materialmgmt.transaction.MaterialTransaction;
+import org.openbravo.model.pricing.pricelist.PriceList;
+import org.openbravo.model.pricing.pricelist.PriceListVersion;
+import org.openbravo.model.pricing.pricelist.ProductPrice;
+import org.openbravo.scheduling.ProcessBundle;
+import org.openbravo.service.db.CallStoredProcedure;
+
+public class RMInsertOrphanLine implements org.openbravo.scheduling.Process {
+
+  @Override
+  public void execute(ProcessBundle bundle) throws Exception {
+    final String language = bundle.getContext().getLanguage();
+    final ConnectionProvider conProvider = bundle.getConnection();
+    final VariablesSecureApp vars = bundle.getContext().toVars();
+
+    OBError msg = new OBError();
+    msg.setType("Success");
+    msg.setTitle(OBMessageUtils.messageBD("Success"));
+
+    final String strOrderId = (String) bundle.getParams().get("C_Order_ID");
+    final String strProductId = (String) bundle.getParams().get("mProductId");
+    final String strASIId = (String) bundle.getParams().get("mAttributesetinstanceId");
+    final String strReturnedQty = (String) bundle.getParams().get("returned");
+    final BigDecimal returnedQty = new BigDecimal(strReturnedQty);
+    final String strUnitPrice = (String) bundle.getParams().get("pricestd");
+    final String strTaxId = (String) bundle.getParams().get("cTaxId");
+    final String strReturnReason = (String) bundle.getParams().get("cReturnReasonId");
+
+    Order order = OBDal.getInstance().get(Order.class, strOrderId);
+    Product product = OBDal.getInstance().get(Product.class, strProductId);
+    AttributeSetInstance asi = null;
+    if (strASIId.isEmpty()) {
+      asi = OBDal.getInstance().get(AttributeSetInstance.class, "0");
+    } else {
+      asi = OBDal.getInstance().get(AttributeSetInstance.class, strASIId);
+    }
+
+    // Check attributesetinstance has been used with the product
+    StringBuffer where = new StringBuffer();
+    where.append(" as trx");
+    where.append(" where trx." + MaterialTransaction.PROPERTY_PRODUCT + " = :product");
+    where.append("   and trx." + MaterialTransaction.PROPERTY_ATTRIBUTESETVALUE + " = :asi");
+    OBQuery<MaterialTransaction> attrQry = OBDal.getInstance().createQuery(
+        MaterialTransaction.class, where.toString());
+    attrQry.setNamedParameter("product", product);
+    attrQry.setNamedParameter("asi", asi);
+    if (attrQry.count() == 0) {
+      Map<String, String> parameters = new HashMap<String, String>();
+      parameters.put("product", product.getName());
+      parameters.put("attribute", asi.getDescription());
+      String message = OBMessageUtils.messageBD("WrongAttributeForProduct");
+      msg.setMessage(OBMessageUtils.parseTranslation(message, parameters));
+      msg.setTitle(OBMessageUtils.messageBD("Error"));
+      msg.setType("Error");
+      bundle.setResult(msg);
+      return;
+    }
+
+    OBContext.setAdminMode(true);
+    try {
+      OrderLine newOrderLine = OBProvider.getInstance().get(OrderLine.class);
+      newOrderLine.setSalesOrder(order);
+      newOrderLine.setOrganization(order.getOrganization());
+      newOrderLine.setLineNo(getNewLineNo(order));
+      newOrderLine.setOrderDate(order.getOrderDate());
+      newOrderLine.setWarehouse(order.getWarehouse());
+      newOrderLine.setCurrency(order.getCurrency());
+      newOrderLine.setProduct(product);
+      newOrderLine.setAttributeSetValue(asi);
+      newOrderLine.setUOM(product.getUOM());
+      newOrderLine.setOrderedQuantity(returnedQty.negate());
+
+      if (strUnitPrice.isEmpty()) {
+        ProductPrice productPrice = getProductPrice(product, order.getOrderDate(),
+            order.isSalesTransaction(), order.getPriceList());
+        newOrderLine.setUnitPrice(productPrice.getStandardPrice());
+        newOrderLine.setListPrice(productPrice.getListPrice());
+        newOrderLine.setPriceLimit(productPrice.getPriceLimit());
+        newOrderLine.setStandardPrice(productPrice.getStandardPrice());
+      } else {
+        BigDecimal unitPrice = new BigDecimal(strUnitPrice);
+        newOrderLine.setUnitPrice(unitPrice);
+        newOrderLine.setListPrice(unitPrice);
+        newOrderLine.setPriceLimit(unitPrice);
+        newOrderLine.setStandardPrice(unitPrice);
+      }
+      // tax
+      TaxRate tax = null;
+      if (strTaxId.isEmpty()) {
+        List<Object> parameters = new ArrayList<Object>();
+        parameters.add(product.getId());
+        parameters.add(order.getOrderDate());
+        parameters.add(order.getOrganization().getId());
+        parameters.add(order.getWarehouse().getId());
+        parameters.add(order.getPartnerAddress().getId());
+        parameters.add(order.getInvoiceAddress().getId());
+        if (order.getProject() != null) {
+          parameters.add(order.getProject().getId());
+        } else {
+          parameters.add(null);
+        }
+        parameters.add("Y");
+
+        String strDefaultTaxId = (String) CallStoredProcedure.getInstance().call("C_Gettax",
+            parameters, null);
+        tax = OBDal.getInstance().get(TaxRate.class, strDefaultTaxId);
+      } else {
+        tax = OBDal.getInstance().get(TaxRate.class, strTaxId);
+      }
+
+      newOrderLine.setTax(tax);
+
+      if (strReturnReason.isEmpty()) {
+        newOrderLine.setReturnReason(OBDal.getInstance().get(ReturnReason.class, strReturnReason));
+      } else {
+        newOrderLine.setReturnReason(order.getReturnReason());
+      }
+
+      List<OrderLine> orderLines = order.getOrderLineList();
+      orderLines.add(newOrderLine);
+      order.setOrderLineList(orderLines);
+
+      OBDal.getInstance().save(newOrderLine);
+      OBDal.getInstance().save(order);
+      OBDal.getInstance().flush();
+
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+
+    bundle.setResult(msg);
+  }
+
+  private Long getNewLineNo(Order order) {
+    StringBuffer where = new StringBuffer();
+    where.append(" as ol");
+    where.append(" where ol." + OrderLine.PROPERTY_SALESORDER + " = :order");
+    where.append(" order by ol." + OrderLine.PROPERTY_LINENO + " desc");
+    OBQuery<OrderLine> olQry = OBDal.getInstance().createQuery(OrderLine.class, where.toString());
+    olQry.setNamedParameter("order", order);
+    if (olQry.count() > 0) {
+      OrderLine ol = olQry.list().get(0);
+      return ol.getLineNo() + 10L;
+    }
+    return 10L;
+  }
+
+  private ProductPrice getProductPrice(Product product, Date date, boolean useSalesPriceList,
+      PriceList priceList) throws OBException {
+    StringBuffer where = new StringBuffer();
+    where.append(" as pp");
+    where.append("   join pp." + ProductPrice.PROPERTY_PRICELISTVERSION + " as plv");
+    where.append("   join plv." + PriceListVersion.PROPERTY_PRICELIST + " as pl");
+    where.append(" where pp." + ProductPrice.PROPERTY_PRODUCT + " = :product");
+    where.append("   and plv." + PriceListVersion.PROPERTY_VALIDFROMDATE + " <= :date");
+    if (priceList != null) {
+      where.append("   and pl = :pricelist");
+    } else {
+      where.append("   and pl." + PriceList.PROPERTY_SALESPRICELIST + " = :salespricelist");
+    }
+    where.append(" order by pl." + PriceList.PROPERTY_DEFAULT + " desc, plv."
+        + PriceListVersion.PROPERTY_VALIDFROMDATE + " desc");
+
+    OBQuery<ProductPrice> ppQry = OBDal.getInstance().createQuery(ProductPrice.class,
+        where.toString());
+    ppQry.setNamedParameter("product", product);
+    ppQry.setNamedParameter("date", date);
+    if (priceList != null) {
+      ppQry.setNamedParameter("pricelist", priceList);
+    } else {
+      ppQry.setNamedParameter("salespricelist", useSalesPriceList);
+    }
+
+    List<ProductPrice> ppList = ppQry.list();
+    if (ppList.isEmpty()) {
+      // No product price found.
+      throw new OBException("@PriceListVersionNotFound@. @Product@: " + product.getIdentifier()
+          + " @Date@: " + OBDateUtils.formatDate(date));
+    }
+    return ppList.get(0);
+  }
+}
--- a/src/org/openbravo/erpCommon/utility/OBMessageUtils.java	Tue May 29 12:03:21 2012 +0200
+++ b/src/org/openbravo/erpCommon/utility/OBMessageUtils.java	Wed May 30 15:46:09 2012 +0200
@@ -167,6 +167,21 @@
   /**
    * Parse the text searching @ parameters to translate.
    * 
+   * @param text
+   *          String with the text to translate.
+   * @param replaceMap
+   *          optional Map containing replacement values for the tokens
+   * @return String translated.
+   */
+  public static String parseTranslation(String text, Map<String, String> map) {
+    final VariablesSecureApp vars = RequestContext.get().getVariablesSecureApp();
+    final String language = OBContext.getOBContext().getLanguage().getLanguage();
+    return parseTranslation(new DalConnectionProvider(false), vars, map, language, text);
+  }
+
+  /**
+   * Parse the text searching @ parameters to translate.
+   * 
    * @param conn
    *          Handler for the database connection.
    * @param vars