Fix joins when ordering on ir.model.field

issue3910
review10311002
(grafted from 5754ea65653441eace71fd814b75f2174fad1e70)

--HG--
branch : 3.2
extra : source : 5754ea65653441eace71fd814b75f2174fad1e70
Fix KeyError when raising digits validation error.

issue3970
review8411002
(grafted from 8d071b3c5c7e8c0d62469c0d94ac8056da1db6fb)

--HG--
branch : 3.2
extra : source : 8d071b3c5c7e8c0d62469c0d94ac8056da1db6fb