Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.17.1 breaks compatibility for shipment allocations. #250

Closed
miggland opened this issue Dec 16, 2024 · 1 comment
Closed

Version 0.17.1 breaks compatibility for shipment allocations. #250

miggland opened this issue Dec 16, 2024 · 1 comment

Comments

@miggland
Copy link
Contributor

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
3

Against 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
67

The 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
@SchrodingersGat
Copy link
Member

Closed in #251

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants