-
Notifications
You must be signed in to change notification settings - Fork 36
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
help on using fieldNames & fieldInfo #248
Comments
@turist79 your code should be working just fine: from inventree.api import InvenTreeAPI
from inventree.part import Part
api = InvenTreeAPI(
'http://localhost:8000',
username='admin',
password='inventree'
)
fields = Part.fieldNames(api)
for f in fields:
print("-", f, ':', Part.fieldInfo(f, api)) yields
Can you perform other operations with the API? |
yields
which is correct from 2 items with no location one is installed inside other stock item, the other is quarantined. PS: those two moments are a big issue for me by the way - need to find workaround how ot see such items as in stock but not available. |
@SchrodingersGat is there any ideas why no field info is printed out as the result of the code above? |
@turist79 sorry, I'm stumped on this one. Perhaps you could do some debugging, there may be an edge case that we have not considered |
Hi
just making myself familiar with the API.
i am able to connect to my Inventree server (running in docker on other machine) using dedicated user with only "view" rights to all except Admin.
i can list all stock items with names and locations.
But somehow this simple thing from the documentation does not work in any way:
it does not crash - just does not yield any result. i dont get why would be that, i have checked the source code - there is defenetely corresponding method for that in base inventree object.
PS: this is the right and only way to see the full ist of fields & properties of the obects or is there some documentation on that topic as well?
Thanks
The text was updated successfully, but these errors were encountered: