https://github.com/Sylius/Sylius/blob/master/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerChoiceType.php#L59
Form type uses code as value but customer does not have code.
It seems to not be used or tested at all.
@GrandLTU I will look for that, thanks
@GrandLTU You are right. I had to have narrowed scope when I have looked for it. I will cover it with test and fix than.
@lchrusciel It should use e-mail instead of code and should be fine, I guess.
@pjedrzejewski @GrandLTU it required a few more fixes, but it should work now.