Inventory templates #5808

Closed
opened 2025-12-29 19:32:58 +01:00 by adam · 3 comments
Owner

Originally created by @PieterL75 on GitHub (Dec 20, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.1.0

Feature type

Data model extension

Proposed functionality

Proposal is to create Inventory Templates that allow us to define an inventory item basics,
The device inventory item will need a reference to the template and extended with unique fields like serial numbers

Use case

In devices, the inventory can be updated by manually entering the Manu/Partid/name,...
Lots of parts are used multiple times in different devices (like in servers :CPU types, Memory or in routers/switches, linecards, routing engines,...),
It will keep the inventory 'clean' of typo's, garbage, ...
The inventory items can be limited to the only those that are allowed.

Database changes

A new model is required
dcim.inventory_template

  • Name
  • Manufacturer (dcim.manufacturer)
  • PartID

The dcim.inventory_item needs to be updated
Remove

  • Manufacturer (dcim.manufacturer)
  • PartID
    Add
  • Inventory_template (dcim.inventory_template)

There is no need to enforce the Manufacturer to be the same as or limit to the device the inventory item is added to.

External dependencies

No response

Originally created by @PieterL75 on GitHub (Dec 20, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.1.0 ### Feature type Data model extension ### Proposed functionality Proposal is to create Inventory Templates that allow us to define an inventory item basics, The device inventory item will need a reference to the template and extended with unique fields like serial numbers ### Use case In devices, the inventory can be updated by manually entering the Manu/Partid/name,... Lots of parts are used multiple times in different devices (like in servers :CPU types, Memory or in routers/switches, linecards, routing engines,...), It will keep the inventory 'clean' of typo's, garbage, ... The inventory items can be limited to the only those that are allowed. ### Database changes A new model is required dcim.inventory_template - Name - Manufacturer (dcim.manufacturer) - PartID The dcim.inventory_item needs to be updated Remove - Manufacturer (dcim.manufacturer) - PartID Add - Inventory_template (dcim.inventory_template) There is no need to enforce the Manufacturer to be the same as or limit to the device the inventory item is added to. ### External dependencies _No response_
adam added the status: acceptedtype: feature labels 2025-12-29 19:32:58 +01:00
adam closed this issue 2025-12-29 19:32:58 +01:00
Author
Owner

@jeremystretch commented on GitHub (Dec 20, 2021):

There is no need to enforce the Manufacturer to be the same as or limit to the device the inventory item is added to.

We wouldn't remove the manufacturer assignment as part of this. The InventoryItemTemplate model would replicate the manufacturer field and set its value upon the instantiation of new InventoryItems.

@jeremystretch commented on GitHub (Dec 20, 2021): > There is no need to enforce the Manufacturer to be the same as or limit to the device the inventory item is added to. We wouldn't remove the manufacturer assignment as part of this. The InventoryItemTemplate model would replicate the manufacturer field and set its value upon the instantiation of new InventoryItems.
Author
Owner

@PieterL75 commented on GitHub (Dec 21, 2021):

What I meant is, that it should be possible to (for example) put an Samung HD in a Dell server.
That there should be no restriction in the Manufacturer of the Inventory item and the device

@PieterL75 commented on GitHub (Dec 21, 2021): What I meant is, that it should be possible to (for example) put an Samung HD in a Dell server. That there should be no restriction in the Manufacturer of the Inventory item and the device
Author
Owner

@jeremystretch commented on GitHub (Dec 27, 2021):

It's a bit quick, but I think it makes sense to tackle this in v3.2 as it fits in nicely with some of our other milestones (#3087 and #7846).

@jeremystretch commented on GitHub (Dec 27, 2021): It's a bit quick, but I think it makes sense to tackle this in v3.2 as it fits in nicely with some of our other milestones (#3087 and #7846).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5808