-
Notifications
You must be signed in to change notification settings - Fork 41
Description
I appreciate that you have tried to make this legacy-compatible through line 273 in sales_order.py (def allocations...), but it seems that version 0.16.9 of InvenTree doesn't support the search parameter ?shipment=<id> , such that shp.allocations now returns all allocations, and no longer those specific to the shipment..
I always assumed that the inventree-python version was more-or-less independent of the InvenTree server version, and that the API version check would take care of discrepancies.
PoC:
Using inventree-python on master branch.
Against demo server, the results are as expected:
>>> shp = SalesOrderShipment(api, 3)
>>> for S in shp.allocations: S.shipment
...
3
3
3Against my own server, running 0.16.9:
>>> shp = SalesOrderShipment(api, 67)
>>> for S in shp.allocations: S.shipment
...
1
3
6
6
6
6
8
...
64
64
63
66
67The list includes 202 items - whereas the shipment actually only has one allocation, as correctly contained in shp._data['allocations
>>> for s in shp._data['allocations']: S.shipment
...
67