Can't move qty from a parent location to child location
Locations:
- Location "X"
- Location "AX"
- Location "BX"
- Location "Y"
The product A, I have stock in location "X" and location "AX".
I create a new move (with internal shipment):
- From locatoon: Location "X"
- To location: Location "AX"
In case I assign a shipment, qty from location "X" to location "AX", I can't because in the assign_try [2] write the from_location that have stock (location name "AX" is before that "X" in order name [2]) and not respect the from_location that I insert in the stock.move.
I get the error "Source and destination location must be different" because assing try, add "from tocation" to "AX" and is equal "to location".
I think with need to skip to_location in add locations in location_qties dict [3].
for location in childs:
+ if location.id == to_location.id:
+ continue
key = get_key(location)
[1] https://bitbucket.org/tryton/stock/src/9872e817351e36c2d2b6e438b835af3eb66c93b5/move.py#lines-857
[2] https://bitbucket.org/tryton/stock/src/9872e817351e36c2d2b6e438b835af3eb66c93b5/location.py#lines-123
[3] https://bitbucket.org/tryton/stock/src/9872e817351e36c2d2b6e438b835af3eb66c93b5/move.py#lines-868