Place an AI soldier (any type)
Shoot him
Walk up to the body, select inventory.
Only their weapon will show up, not his other gear such as grenades, ammo or clothing/uniform.
Take their weapon. Then select rearm at soldier (dependent on type of course).
Then take your Original weapon back again.
Only now will you be able to take the rest of the AI's equipment.