While doing investigation I have found the
- User was performing receiving against an RMA , and
- RMA was referring sales order (Original Sales Order).
- At the same time Ship from org ID ( warehouse ) referred on the Original Sales Order was disabled.
It is this disabled warehouse (ship from org ID) on the original Sales order that results in this error "Cannot derive Chart of Account ID from xyz from organization Definitions" .
To fix this issue we enabled the warehouse again and performed receiving against RMA and disabled the warehouse again.