Fix context test in Product.get_cost_value

issue3868
review6311002
(grafted from b4c8414842953207ccf25bf3cd69f89e5d01ca61)

--HG--
branch : 3.0
extra : source : b4c8414842953207ccf25bf3cd69f89e5d01ca61
Use correct grouping when adding to warehouse

issue3843
review11281005
(grafted from 8f82de792dabe2d4c1dc8d9650d2642622580cb3)

--HG--
branch : 3.0
extra : source : 8f82de792dabe2d4c1dc8d9650d2642622580cb3