Using the computed location to get the expected type is not reliable because
for return order, the location can be of different type and the stock move can
change of location type.
Closes#12203
(grafted from ce0b073cd8e637b8052ae3fa5e9bb4d8a7f6ea53)
--HG--
branch : 6.0
When the clause is negative, it must return an AND-ed domain instead of OR-ed.
(grafted from e8c1e7d592b5a21cec95e8d6614112b8021e34d5)
--HG--
branch : 6.0