Skip to content

Commit 91694c3

Browse files
committed
Merge branch 'merge_financial_unnecessary_fields' into 'main'
merge_financial_unnecessary_fields Closes #30, #29, #23, and #21 See merge request 701/netbox/cesnet_service_path_plugin!38
2 parents b5286cb + 80f3aff commit 91694c3

File tree

82 files changed

+2196
-405
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2196
-405
lines changed

.ruff.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
line-length = 120

CHANGELOG.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,66 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [5.2.0] - TBD
9+
10+
### Added
11+
- **Financial Information Management**: New segment financial tracking system
12+
- `SegmentFinancialInfo` model for tracking segment costs and commitments
13+
- Monthly charge and non-recurring charge fields
14+
- Multi-currency support with configurable currency list
15+
- Commitment period tracking (months)
16+
- Automatic cost calculations (total commitment cost, total with setup)
17+
- Permission-based access control for financial data
18+
- Integration with segment detail view
19+
- REST API support with nested serialization in segment endpoints
20+
- Financial info displayed only to users with view permissions
21+
22+
- **Plugin Configuration**: Enhanced configuration options
23+
- Configurable currency list in plugin settings
24+
- Default currency selection
25+
- Example configuration in README
26+
27+
- **Plugin Metadata**: Added `netbox-plugin.yaml`
28+
- Official plugin metadata file for NetBox plugin registry
29+
- Compatibility matrix with NetBox versions
30+
- Package information and versioning
31+
32+
### Changed
33+
- **API Enhancements**:
34+
- Improved error handling in segment serializer with detailed logging
35+
- Financial info included in segment API responses (permission-based)
36+
- Cleaner error messages for path file upload failures
37+
- Better separation of validation and processing errors
38+
39+
- **Permission System**:
40+
- Financial data visibility controlled by Django permissions
41+
- View, add, change, and delete permissions for financial info
42+
- Automatic permission checks in views and API
43+
44+
- **Documentation Updates**:
45+
- Updated plugin configuration examples with currency settings
46+
- Corrected file path references (configuration.py → configuration/plugins.py)
47+
- Updated compatibility badge to reflect NetBox 4.4 support
48+
49+
- **Development Dependencies**:
50+
- Unpinned development dependency versions for flexibility
51+
- Updated Python version requirement to >= 3.10
52+
- Corrected license classifier to Apache 2.0
53+
54+
### Technical Details
55+
- Financial info uses one-to-one relationship with Segment model
56+
- Currency choices are dynamically loaded from plugin configuration
57+
- Financial data is optional - segments can exist without financial info
58+
- API serializer uses method field for conditional financial data inclusion
59+
- Redirect-based views for better UX (financial detail redirects to segment detail)
60+
- Custom return URL handling for create/edit/delete operations
61+
62+
### Migration Notes
63+
- **New Model**: `SegmentFinancialInfo` table will be created
64+
- **Permissions**: Four new permissions added for financial info management
65+
- **Configuration**: Optional currency configuration can be added to plugin settings
66+
- **API Change**: Segment API responses now include `financial_info` field (null if no data or no permission)
67+
868
## [5.1.0] - 2025-09-23
969

1070
### Added

0 commit comments

Comments
 (0)