details: https://code.openbravo.com/erp/devel/pi/rev/8286df3adce0 changeset: 35462:8286df3adce0 user: Álvaro Ferraz <alvaro.ferraz <at> openbravo.com> date: Wed Feb 20 17:39:31 2019 +0100 summary: Related to issue 40244: Move isAudit check
diffstat: src/org/openbravo/dal/core/OBInterceptor.java | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diffs (24 lines): diff -r 804ed224407c -r 8286df3adce0 src/org/openbravo/dal/core/OBInterceptor.java --- a/src/org/openbravo/dal/core/OBInterceptor.java Wed Feb 20 17:15:55 2019 +0100 +++ b/src/org/openbravo/dal/core/OBInterceptor.java Wed Feb 20 17:39:31 2019 +0100 @@ -281,7 +281,7 @@ if ((isNew || currentState[i] != previousState[i]) && !(currentState[i] instanceof Organization) && (currentState[i] instanceof BaseOBObject || currentState[i] instanceof HibernateProxy) - && currentState[i] instanceof OrganizationEnabled && !isAudit(propertyNames[i])) { + && currentState[i] instanceof OrganizationEnabled) { // get the organization from the current state final OrganizationEnabled oe = (OrganizationEnabled) currentState[i]; final Organization o2 = oe.getOrganization(); @@ -300,8 +300,9 @@ continue; } - boolean skipCrossOrgCheck = obContext.isInCrossOrgAdministratorMode() - && bob.getEntity().getProperty(propertyNames[i]).isAllowedCrossOrgReference(); + boolean skipCrossOrgCheck = (obContext.isInCrossOrgAdministratorMode() + && bob.getEntity().getProperty(propertyNames[i]).isAllowedCrossOrgReference()) + || isAudit(propertyNames[i]); if (!skipCrossOrgCheck && !obObject.getEntity().isVirtualEntity() && !obContext.getOrganizationStructureProvider(o1.getClient().getId()) _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits