Openbravo Issue Tracking System - Modules
View Issue Details
0017907ModulesIntercompany Documentspublic2011-07-05 19:012017-10-23 13:46
dalsasua 
Triage Omni OMS 
normalmajoralways
newopen 
20Ubuntu 10.10
 
 
0017907: Let's study if a val-rule can be "relaxed"
Validation Rule INTERCO_matchingDoc says:
... AND ((AD_ISORGINCLUDED(@ad_orgtarget_ID@,c_doctype.ad_org_ID,@Ad_Client_ID@)!= -1) OR (AD_ISORGINCLUDED(c_doctype.ad_org_ID,@ad_orgtarget_ID@,@Ad_Client_ID@)!= -1)) ...

This restricts that the document types to use for the inter-company are defined at an organization level which is a node in the organizational tree common for both organizations.
.
--- a/src-db/database/sourcedata/AD_VAL_RULE.xml
+++ b/src-db/database/sourcedata/AD_VAL_RULE.xml
@@ -20,7 +20,7 @@
 <!--EC5C5EF01AED40EB89418CCDB643BAC1--> <NAME><![CDATA[INTERCO_matchingDoc]]></NAME>
 <!--EC5C5EF01AED40EB89418CCDB643BAC1--> <DESCRIPTION><![CDATA[Only not intercompany document types - matching issotrx]]></DESCRIPTION>
 <!--EC5C5EF01AED40EB89418CCDB643BAC1--> <TYPE><![CDATA[S]]></TYPE>
-<!--EC5C5EF01AED40EB89418CCDB643BAC1--> <CODE><![CDATA[c_doctype.IsSOTrx NOT IN (SELECT isSOTrx FROM c_DocType WHERE c_doctype_ID= @C_doctype_ID@) AND ((AD_ISORGINCLUDED(@ad_orgtarget_ID@,c_doctype.ad_org_ID,@Ad_Client_ID@)!= -1) OR (AD_ISORGINCLUDED(c_doctype.ad_org_ID,@ad_orgtarget_ID@,@Ad_Client_ID@)!= -1)) AND c_doctype.EM_INTERCO_IS_INTERCOMPANY='Y']]></CODE>
+<!--EC5C5EF01AED40EB89418CCDB643BAC1--> <CODE><![CDATA[c_doctype.IsSOTrx NOT IN (SELECT isSOTrx FROM c_DocType WHERE c_doctype_ID= @C_doctype_ID@) AND c_doctype.EM_INTERCO_IS_INTERCOMPANY='Y']]></CODE>
 <!--EC5C5EF01AED40EB89418CCDB643BAC1--> <AD_MODULE_ID><![CDATA[79182BD5D0D94A5589DA4E6A47110791]]></AD_MODULE_ID>
 <!--EC5C5EF01AED40EB89418CCDB643BAC1--></AD_VAL_RULE>
No tags attached.
related to feature request 0017977 new Triage Omni OMS Openbravo ERP Be able to define several sequences for different organization for same document type 
depends on defect 0037140 scheduled markmm82 Openbravo ERP Changing the Organization in Document Type window does not change the records in the child tabs 
related to defect 0021880 closed ngarcia Modules Error in Organization validation in "Inter Company relations" tab 
Not all the children of this issue are yet resolved or closed.
Issue History
2011-07-05 19:01dalsasuaNew Issue
2011-07-05 19:01dalsasuaAssigned To => dalsasua
2011-07-05 20:10dalsasuaIssue Monitored: networkb
2011-07-20 18:09dalsasuaAssigned Todalsasua => jonalegriaesarte
2017-10-23 12:45ngarciaAssigned Tojonalegriaesarte => Triage Finance
2017-10-23 12:45ngarciaIssue Monitored: ngarcia
2017-10-23 13:11ngarciaRelationship addedrelated to 0021880
2017-10-23 13:14ngarciaNote Added: 0099993
2017-10-23 13:46ngarciaRelationship addedrelated to 0017977
2017-10-23 13:46ngarciaRelationship addeddepends on 0037140

Notes
(0099993)
ngarcia   
2017-10-23 13:14   
Currently, in Inter-company relations tab, the following validations are included:

Organization: organization of the document type and its children
Source and Target Organization: natural tree of organization selected in Organization field, excluding *

It is not possible to define a document type at organization level in order to have its own document sequence and be automatically selected in different documents and assign it a relation with a sister organization (target organization)