client data pack out with org will pack in into system client

Description

if you packout/packin client data with org * it's correct but with org <> "*" some strange happen

case 1: pack-in client don't have org
1. pack out product P with org = "new org" from client A (so you also have to pack out product category and tax category)
2. on client B, hasn't org = "new org"
3. pack in to client B success but product B have client = system and org = *

case 2: pack in client have org
1. pack out product P with org = "new org" from client A (so you also have to pack out product category and tax category)
2. also pack out org = "new org"
3. pack in to client B success but product B have client = system and org = "new org"
(but org can't load because of difference client)

conclude: when you pack out pack in data from client id with org <> "*". client always set to System.

I think
case 1 should throw un-resolve exception.
case 2 should correct client id to pack in client

Environment

None

Activity

Show:
Hiep Lq
September 17, 2017, 1:02 PM

i saw 2 method to fix this issue
+ at the moment IDFinder.findIdByColumn return 0 for 2 case

  • can't find item

  • item is special case, it have id = 0. normal lie on system client
    + when packout, if data on org <> *, it also pack out client identify (AD_Client_UU)

so can fix to IDFinder.findIdByColumn separate 2 case or fix to don't pack out client identify on this case.

i still don't sure about purpose of export client identify, also don't sure mix of return IDFinder.findIdByColumn
so i make a duty patch, just focus to case i description on this ticket.
IDFinder.findIdByColumn will return -1 in case can't find out client_id or org_id. so i can recognize this case and make logic like i description

Carlos Ruiz
March 21, 2019, 7:13 PM

As mentioned by , possibly solved with IDEMPIERE-3923, pending tests.

Assignee

Unassigned

Reporter

Hiep Lq

Labels

Tested By

None

Components

Priority

Major
Configure