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

Add documents for purchase and deliveries #193

Open
ElonLP opened this issue Sep 4, 2024 · 1 comment
Open

Add documents for purchase and deliveries #193

ElonLP opened this issue Sep 4, 2024 · 1 comment

Comments

@ElonLP
Copy link

ElonLP commented Sep 4, 2024

Feature Request:

It would be highly beneficial if the NetBox-Inventory plugin allowed attaching documents such as quotes, order confirmations, and delivery notes to purchases and deliveries. This feature would centralize relevant documentation, making it easier to track and manage procurement and delivery processes within NetBox.

Thank you for considering this enhancement!

@cs-1
Copy link
Contributor

cs-1 commented Sep 4, 2024

Hi @ElonLP,

I would definitely not recommend going down that road because NetBox is very bad at managing documents. When deleting assets or purchases, there's a really high chance that you will accumulate tons of orphaned files on your NetBox server. But there's an elegant way to solve this using Custom Links and your own cloud like ownCloud or nextCloud (or any other cloud, for that matter). Let's take purchases as an example: you go to "Customization > Custom Links" and create a new custom link. Select "NetBox Inventory > Purchase" as "Object types". Create a directory on your cloud server where you'll store documents for a purchase, let's say https://my.example.cloud.com/purchases. Tick the "New window" checkbox in the custom link. Enter "Purchase documents" as "Link text" (this will be the label on the button in your purchase view). Let's say you want to store documents for purchase "12345". Create the directory https://my.example.cloud.com/purchases/12345 in your cloud. Now set "Link URL" in your custom link to

https://my.example.cloud.com/purchases/{{ object.name }}

This will replace {{ object.name }} in the URL with the name of the purchase. Save the custom link. From now on, a button "Purchase documents" will show up in your purchases. When you click it, the correct cloud directory with the said purchase's documents will open up in a new browser window. Voilà!

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