Tryton - Issues

 

Message44866

Author resteve
Recipients
Date 2018-11-13.11:35:47
Content
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
History
Date User Action Args
2018-11-13 11:35:48restevesetmessageid: <1542105348.18.0.663372705916.issue7856@tryton.org>
2018-11-13 11:35:48restevelinkissue7856 messages
2018-11-13 11:35:47restevecreate

Showing 10 items. Show all history (warning: this could be VERY long)