Inventory Management (Open Source!)


#17

Yes, there are plans for this. But you are right that it is a complex problem to solve. at the very least each install would need their own API key to access the data. There is also the issue of end-user agreements for using API data - some do not really allow “caching” of data - but I am yet to fully understand what this means.

It is also difficult to program something like this to function in the background, without someone keeping an eye on the script. There is a potential to inject a lot bad data without any user input.

One option is to provide API integration as “add-on” scripts which you run separately to the web interface. The InvenTree Python API - https://github.com/inventree/inventree-python - would be perfect for this.

Most of these external APIs (digikey / octopart / etc) provide sample python code and this could be linked very simply with the InvenTree python code.

I envision that some sample scripts could be provided and the user just has to provide their own API key.


#18

Where the data is actually served is up to the particular installation requirements:

Local Install

For a simple implementation this could be running locally on your PC. I have a development database serving from my PC (running under WSL on Windows).

Local Network

If installed on a local network server it could be accessible to anyone on the network.

Cloud

You could run InvenTree on some globally-accessible server e.g. AWS. Currently this is how we are running our work install.

The actual infrastructure that you use to serve the database is not prescribed. Here’s the basic set up I am running.

  • InvenTree database in MySQL
  • Gunicorn serves the web application and runs the python / database interface
  • Apache as a webserver to direct traffic to Gunicorn
  • AWS does all the hosting / storage / URL lookup magic

Exactly how far you would want to take this depends on your specific requirements. There are plenty of guides on setting this up for a generic django application.


#19

This project started as a result of reviewing these existing systems, and deciding that actually using them was far too cumbersome, and it would be too tough to convince everyone to keep track of the data. Without good data the whole system falls down - so it should be easy to use as a priority.

My chief concern is retaining the ease of use. At the core of the project is:

  • Understanding what parts you have in stock
  • Knowing where those parts are
  • Knowing what you can build, and what you need to order to fulfill requirements

This core functionality is what I want to focus on supporting. There will be associated functionality of course and I’m happy to consider any changes or features but not at the cost of these features.


#20

I just installed from the latest code - looks like revisions as of 2 hours before I D/L, commit afdea81 - and I get a very similar failure. For me, it happens when I run the development server.
" You have 82 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, authtoken, build, common, company, contenttypes, order, part, sessions, stock.

Run ‘python manage.py migrate’ to apply them."

Blew the folder away, cloned again, followed instructions again - same results. Any suggestions?


#21

I like the focus and hope you can keep it that way - I agree that many systems out there (which admittedly have more functionality) are a pain to work with. Besides your 3 focus items, I want to try if invenTree can work as a small scale CM, it seems to have most of what is needed.


#22

:clap: :clap: :+1:
Truer words were never spoken . . . .

Dale


#23

This is a tool I really need.
However, some of the dependencies does not seem to be available in Fedora 30’s repos.
Anyone that’s installed this in Fedora 30 64bit?


#24

On a related note :slight_smile:


#25

Hey @rco3 sorry that you’ve run into this problem. I think I have worked out what might be going wrong.

This might be the faulty step in the docs:

Can you please try the following for me. Once you get to this step, run:

cd InvenTree && python3 manage.py runserver 127.0.0.1:8000

I suspect that there is an issue with regards to which directory you call the script from, if (and only if) you are using an SQLite database.

Please let me know if this fixes the problem, and I’ll fix the script and the documenation.

Cheers


#26

Would please post an howto to create this kind of local installation?


#27

I just performed a local installation following the getting started documentation here:
https://inventree.readthedocs.io/en/latest/start.html


#28

The “out of the box” install process sets up a local filesystem database - using the SQLite file-storage database backend.

You can get this up and running (on Windows) in two ways:

1. Make for Windows

If you have make.exe installed in your system path, and you also have python3 / pip3 installed then you can follow the process described in the “getting started” guide, directly from cmd.exe shell.

2. Windows Subsystem for Linux (Recommended)

The process is much simpler under WSL - https://docs.microsoft.com/en-us/windows/wsl/install-win10

The same process in the “getting started” guide can be followed from the Ubuntu shell.

WSL is recommended for two reasons:

a) The apt-get system is much easier for installing packages
b) You can run the gunicorn server under WSL but it is not supported on Windows natively

If you follow the getting started guide without any modifications to the config.yaml file, then it will create a new database file called inventree_db.sqlite3

For example here is a local install running from ubuntu shell


#29

@joost I have worked out a way to allow extra URL schemes to be added to URL fields. The database administrator can now choose to allow extra URL schemes in the config.yaml file. By default no extra schemes are allowed. This means that it is up to the user / administrator to select which extra schemes they want, while not altering the default behaviour.


#30

No, no, please don’t apologize. I’m grateful for your work, hope to help in whatever small way I can to improve it.

That does, in fact, appear to have solved the problem. Now I can navigate to the locally-served webpage and see an empty system, ready for parts to be added, and no errors in the terminal window from which I launched.

I’m all excited now. Thanks for all this.


#31

Thanks! It almost works;

With config.yaml now set to:
extra_url_schemes:

  • mailto
  • x-devonthink-item

If I set the part URL to e.g. x-devonthink-item://1C1E931E-1A30-4515-BCF9-45CDF39B56EC, invenTree does not permit saving the item. However, if I stick “.com” (or dot anything for that matter) at the end, it saves it. The same is true for mailto, a setting mailto://testing does not save but mailto://testing.com does.

If the part is stored with URL x-devonthink-item://1C1E931E-1A30-4515-BCF9-45CDF39B56EC.com, devonthink does indeed open but cannot find the specific document (of course) so it seems that if that dot-anything requirement is removed this would work smoothly.


#32

Got it working, thanks for a great tool.
I had downloaded the. zip, started over with “git clone xxxxxxxx…” and for some reason it works now.

Edit: Added picture


#33

Same here. 20…


#34

I’ve spent a a couple of hours putting parts in to InvenTree and I am about 80% through my 0403 resistors…
It’s a pain when first putting all parts in lol


#35

@mayday I think I can save you some time. There is now a bulk import function, available in the Admin interface.

Follow the steps below to access it:

Note: If you first export the parts list you will get a pre-formatted template that you can then use to import the data. The import function requires strictly formatted data for import, so this template file is helpful for this.


#36

Thank you, both for the software and the support/help!

Edit: I used the .csv file InvenTree created when exporting the parts. When I added some parts exactly like the parts already there. I got a bunch of error messages about line 1 and something about id.
I didn’t take any screenshots unfortunately.