Release Notes: v12.0.0b2
This release introduces major enhancements to the Inventory Monitor plugin, including full compatibility with NetBox v4.4+, comprehensive multi-currency support, and significant improvements to data models, UI/UX, and performance.
🚀 Features & Enhancements
NetBox v4.0+ Compatibility
- Full Compatibility: The plugin is now fully compatible with NetBox v4.4.x and newer.
- ObjectType Migration: Internal APIs have been updated from
ContentTypetoObjectTypeto align with NetBox v4.0 standards. This change is seamless and backward-compatible. - Expanded Asset Assignment: Assets can now be assigned to
dcim.Modulein addition to existing object types (Site, Location, Rack, Device).
Multi-Currency Support
- Global Currency Configuration: You can now define a list of available currencies and a default currency in the plugin settings.
- Financial Models Updated:
Asset,Contract,Invoice, andAssetServicemodels now include acurrencyfield. - Automatic Validation: The system enforces that a currency is set if a price is provided, ensuring data consistency.
- Dynamic UI: Prices are now displayed with the appropriate currency symbol throughout the UI, including tables and detail views.
Data Model & Readability Improvements
- Enhanced String Representations: All models now feature more descriptive and human-readable string representations, making it easier to identify and search for objects in dropdowns and lists.
- Descriptive Fields: New
descriptionfields have been added to most models, and their content is automatically displayed in UI choice fields for better context. - Asset Model:
- The
serialfield is now mandatory. - Added deletion protection: Assets linked to an
order_contractor anExternalInventoryitem cannot be deleted without removing the association first.
- The
- RMA Workflow:
- The
rma_numberis now optional, allowing for the creation of draft RMAs. - A detailed RMA workflow is documented in the new
docs/rma-workflow.md.
- The
- External Inventory:
- Status display is now configurable with custom labels and colors.
- Added deletion protection for items that have associated assets.
- Contract Model:
- Subcontracts are now limited to one level of hierarchy.
- A subcontract can now have a different contractor than its parent, allowing for more complex scenarios.
UI & UX Improvements
- Up-to-Date Documentation: The
README.mdfile has been significantly updated with a new data model overview, an upgrade guide, and detailed configuration options. - Customizable Field Choices: You can now customize or extend choice fields for statuses and types (e.g.,
Asset.assignment_status,Contract.type) using NetBox'sFIELD_CHOICESconfiguration. - Improved Forms and Filters:
- Filter forms now include more options, such as filtering by price ranges and currency.
- The asset assignment form for external inventory (
AssetExternalInventoryAssignmentForm) has been improved to prevent unrelated validation errors.
Performance
- Optimized Queries: List views now use
select_relatedandprefetch_relatedto significantly reduce the number of database queries and improve page load times. - Efficient Probe Status: A new
Asset.annotate_with_probe_datamethod efficiently computes probe status in the database, preventing N+1 query issues on the asset list view.
Breaking Changes
- There are no breaking changes in this release. All existing data and API endpoints are fully backward-compatible.
Internal Changes & Refactoring
- Squashed Migrations: Database migrations have been squashed and cleaned up for a more straightforward migration path.
- Refactored Helpers: Currency-related logic has been centralized in
helpers.py, withCurrencyColumnandformat_price_with_currencyreplacing older, less flexible components. - GraphQL Updates: The GraphQL schema has been updated to include the new
currencyfields on relevant types.
This version marks a significant step forward in functionality and compatibility, making asset management more flexible and robust.
Full Changelog: v11.0.2...v12.0.0b2