netbox-contract 2.2.7__tar.gz → 2.2.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {netbox_contract-2.2.7/src/netbox_contract.egg-info → netbox_contract-2.2.8}/PKG-INFO +3 -2
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/README.md +2 -1
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/pyproject.toml +1 -1
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/__init__.py +1 -1
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/forms.py +53 -22
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/models.py +4 -3
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/views.py +6 -6
- {netbox_contract-2.2.7 → netbox_contract-2.2.8/src/netbox_contract.egg-info}/PKG-INFO +3 -2
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/LICENSE +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/MANIFEST.in +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/setup.cfg +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/setup.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/api/__init__.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/api/serializers.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/api/urls.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/api/views.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/constants.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/filtersets.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0001_initial.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0002_alter_contract_circuit_and_more.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0003_alter_contract_custom_field_data_and_more.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0004_contract_currency_invoice_currency.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0005_contract_accounting_dimensions_and_more.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0006_alter_contract_circuit.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0007_invoice_date.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0008_invoice_comments.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0009_contract_external_reference.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0010_invoice_contracts.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0011_auto_20230122_2112.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0012_remove_invoice_contract.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0013_contract_documents_invoice_documents.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0014_contract_end_date.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0015_contractassignement.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0016_contract_parent.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0017_alter_contract_accounting_dimensions.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0018_contract_external_partie_object_id_and_more.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0019_auto_20230924_1813.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0020_alter_contract_external_partie.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0021_alter_contract_external_partie.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0022_alter_contract_internal_partie_alter_contract_parent.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0023_rename_contractassignement_contractassignment_and_more.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0024_remove_contract_external_partie.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0025_remove_contract_circuit_and_more.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0026_auto_20240421_1550.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0027_invoiceline.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0028_invoiceline_accounting_dimensions.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0029_remove_invoiceline_accounting_dimensions_and_more.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0030_alter_invoiceline_accounting_dimensions.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0031_contract_invoice_template_invoice_template.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0032_alter_invoice_period_end_alter_invoice_period_start_and_more.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0033_remove_contract_invoice_template.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0034_contract_yrc_alter_contract_mrc.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0035_accountingdimension_status_and_more.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0036_alter_invoiceline_accounting_dimensions.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/__init__.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/navigation.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/search.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/tables.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/template_content.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/templates/contract_assignments_bottom.html +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/templates/contract_list_bottom.html +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/templates/netbox_contract/accountingdimension.html +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/templates/netbox_contract/contract.html +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/templates/netbox_contract/contractassignment.html +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/templates/netbox_contract/invoice.html +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/templates/netbox_contract/invoiceline.html +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/templates/netbox_contract/serviceprovider.html +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/urls.py +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract.egg-info/SOURCES.txt +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract.egg-info/dependency_links.txt +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract.egg-info/not-zip-safe +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract.egg-info/requires.txt +0 -0
- {netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: netbox-contract
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.8
|
|
4
4
|
Summary: Contract management plugin for Netbox
|
|
5
5
|
Author-email: Marc Lebreuil <marc@famillelebreuil.net>
|
|
6
6
|
Project-URL: Homepage, https://github.com/mlebreuil/netbox-contract
|
|
@@ -73,13 +73,14 @@ PLUGINS_CONFIG = {
|
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
* top_level_menu : If "Contracts" appears under the "Plugins" menu item or on its own
|
|
76
|
-
* default_accounting_dimensions: The accounting dimensions which will appear in the field' background when empty.
|
|
76
|
+
* default_accounting_dimensions: The accounting dimensions which will appear in the field' background when empty. Note that accounting dimensions are now managed as individual objects. The use of this field is deprecated.
|
|
77
77
|
* mandatory_contract_fields, mandatory_invoice_fields: Fields which are not required by default and can be set as such. The list of fields is at the bottom of the contract import form.
|
|
78
78
|
* hidden_contract_fields, hidden_invoice_fields: List of fields to be hidden. Fields should not be required to be hidden.
|
|
79
79
|
|
|
80
80
|
### Customize the plugin fields choices
|
|
81
81
|
|
|
82
82
|
Internal partie reference the legal entity of your organization that is a partie to the contract.
|
|
83
|
+
The first currency will also be the default currency for contracts.
|
|
83
84
|
|
|
84
85
|
```python
|
|
85
86
|
# configuration.py
|
|
@@ -57,13 +57,14 @@ PLUGINS_CONFIG = {
|
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
* top_level_menu : If "Contracts" appears under the "Plugins" menu item or on its own
|
|
60
|
-
* default_accounting_dimensions: The accounting dimensions which will appear in the field' background when empty.
|
|
60
|
+
* default_accounting_dimensions: The accounting dimensions which will appear in the field' background when empty. Note that accounting dimensions are now managed as individual objects. The use of this field is deprecated.
|
|
61
61
|
* mandatory_contract_fields, mandatory_invoice_fields: Fields which are not required by default and can be set as such. The list of fields is at the bottom of the contract import form.
|
|
62
62
|
* hidden_contract_fields, hidden_invoice_fields: List of fields to be hidden. Fields should not be required to be hidden.
|
|
63
63
|
|
|
64
64
|
### Customize the plugin fields choices
|
|
65
65
|
|
|
66
66
|
Internal partie reference the legal entity of your organization that is a partie to the contract.
|
|
67
|
+
The first currency will also be the default currency for contracts.
|
|
67
68
|
|
|
68
69
|
```python
|
|
69
70
|
# configuration.py
|
|
@@ -5,7 +5,7 @@ class ContractsConfig(PluginConfig):
|
|
|
5
5
|
name = 'netbox_contract'
|
|
6
6
|
verbose_name = 'Netbox contract'
|
|
7
7
|
description = 'Contract management plugin for Netbox'
|
|
8
|
-
version = '2.2.
|
|
8
|
+
version = '2.2.8'
|
|
9
9
|
author = 'Marc Lebreuil'
|
|
10
10
|
author_email = 'marc@famillelebreuil.net'
|
|
11
11
|
base_url = 'contracts'
|
|
@@ -65,8 +65,12 @@ class ContractForm(NetBoxModelForm):
|
|
|
65
65
|
widget=HTMXSelect(),
|
|
66
66
|
)
|
|
67
67
|
external_partie_object = forms.ModelChoiceField(queryset=None)
|
|
68
|
-
tenant = DynamicModelChoiceField(
|
|
69
|
-
|
|
68
|
+
tenant = DynamicModelChoiceField(
|
|
69
|
+
queryset=Tenant.objects.all(), required=False, selector=True
|
|
70
|
+
)
|
|
71
|
+
parent = DynamicModelChoiceField(
|
|
72
|
+
queryset=Contract.objects.all(), required=False, selector=True
|
|
73
|
+
)
|
|
70
74
|
accounting_dimensions = Dimensions(required=False)
|
|
71
75
|
|
|
72
76
|
def __init__(self, *args, **kwargs):
|
|
@@ -157,15 +161,19 @@ class ContractForm(NetBoxModelForm):
|
|
|
157
161
|
)
|
|
158
162
|
|
|
159
163
|
|
|
160
|
-
class
|
|
164
|
+
class ContractFilterForm(NetBoxModelFilterSetForm):
|
|
161
165
|
model = Contract
|
|
162
166
|
|
|
163
|
-
tenant = DynamicModelChoiceField(
|
|
167
|
+
tenant = DynamicModelChoiceField(
|
|
168
|
+
queryset=Tenant.objects.all(), required=False, selector=True
|
|
169
|
+
)
|
|
164
170
|
external_reference = forms.CharField(required=False)
|
|
165
171
|
internal_partie = forms.ChoiceField(choices=InternalEntityChoices, required=False)
|
|
166
172
|
status = forms.ChoiceField(choices=StatusChoices, required=False)
|
|
167
173
|
currency = forms.ChoiceField(choices=CurrencyChoices, required=False)
|
|
168
|
-
parent = DynamicModelChoiceField(
|
|
174
|
+
parent = DynamicModelChoiceField(
|
|
175
|
+
queryset=Contract.objects.all(), required=False, selector=True
|
|
176
|
+
)
|
|
169
177
|
tag = TagFilterField(model)
|
|
170
178
|
|
|
171
179
|
|
|
@@ -233,10 +241,18 @@ class ContractBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
233
241
|
name = forms.CharField(max_length=100, required=False)
|
|
234
242
|
external_reference = forms.CharField(max_length=100, required=False)
|
|
235
243
|
internal_partie = forms.ChoiceField(choices=InternalEntityChoices, required=False)
|
|
236
|
-
tenant = DynamicModelChoiceField(
|
|
244
|
+
tenant = DynamicModelChoiceField(
|
|
245
|
+
queryset=Tenant.objects.all(),
|
|
246
|
+
required=False,
|
|
247
|
+
selector=True,
|
|
248
|
+
)
|
|
237
249
|
accounting_dimensions = Dimensions(required=False)
|
|
238
250
|
comments = CommentField(required=False)
|
|
239
|
-
parent = DynamicModelChoiceField(
|
|
251
|
+
parent = DynamicModelChoiceField(
|
|
252
|
+
queryset=Contract.objects.all(),
|
|
253
|
+
required=False,
|
|
254
|
+
selector=True,
|
|
255
|
+
)
|
|
240
256
|
|
|
241
257
|
nullable_fields = (
|
|
242
258
|
'accounting_dimensions',
|
|
@@ -254,7 +270,7 @@ class InvoiceForm(NetBoxModelForm):
|
|
|
254
270
|
help_text='Invoice template name will be overriden to _invoice_template_contract name',
|
|
255
271
|
)
|
|
256
272
|
contracts = DynamicModelMultipleChoiceField(
|
|
257
|
-
queryset=Contract.objects.all(), required=False
|
|
273
|
+
queryset=Contract.objects.all(), required=False, selector=True
|
|
258
274
|
)
|
|
259
275
|
accounting_dimensions = Dimensions(required=False)
|
|
260
276
|
|
|
@@ -360,7 +376,7 @@ class InvoiceForm(NetBoxModelForm):
|
|
|
360
376
|
}
|
|
361
377
|
|
|
362
378
|
|
|
363
|
-
class
|
|
379
|
+
class InvoiceFilterForm(NetBoxModelFilterSetForm):
|
|
364
380
|
model = Invoice
|
|
365
381
|
number = forms.CharField(required=False)
|
|
366
382
|
template = forms.NullBooleanField(
|
|
@@ -368,7 +384,9 @@ class InvoiceFilterSetForm(NetBoxModelFilterSetForm):
|
|
|
368
384
|
)
|
|
369
385
|
currency = forms.ChoiceField(choices=CurrencyChoices, required=False)
|
|
370
386
|
contracts = DynamicModelMultipleChoiceField(
|
|
371
|
-
queryset=Contract.objects.all(),
|
|
387
|
+
queryset=Contract.objects.all(),
|
|
388
|
+
required=False,
|
|
389
|
+
selector=True,
|
|
372
390
|
)
|
|
373
391
|
tag = TagFilterField(model)
|
|
374
392
|
|
|
@@ -403,7 +421,9 @@ class InvoiceBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
403
421
|
template = forms.BooleanField(required=False)
|
|
404
422
|
date = forms.DateField(required=False)
|
|
405
423
|
contracts = DynamicModelMultipleChoiceField(
|
|
406
|
-
queryset=Contract.objects.all(),
|
|
424
|
+
queryset=Contract.objects.all(),
|
|
425
|
+
required=False,
|
|
426
|
+
selector=True,
|
|
407
427
|
)
|
|
408
428
|
period_start = forms.DateField(required=False)
|
|
409
429
|
period_end = forms.DateField(required=False)
|
|
@@ -432,7 +452,7 @@ class ServiceProviderForm(NetBoxModelForm):
|
|
|
432
452
|
fields = ('name', 'slug', 'portal_url', 'comments', 'tags')
|
|
433
453
|
|
|
434
454
|
|
|
435
|
-
class
|
|
455
|
+
class ServiceProviderFilterForm(NetBoxModelFilterSetForm):
|
|
436
456
|
model = ServiceProvider
|
|
437
457
|
name = forms.CharField(required=False)
|
|
438
458
|
tag = TagFilterField(model)
|
|
@@ -458,7 +478,7 @@ class ServiceProviderBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
458
478
|
|
|
459
479
|
|
|
460
480
|
class ContractAssignmentForm(NetBoxModelForm):
|
|
461
|
-
contract = DynamicModelChoiceField(queryset=Contract.objects.all())
|
|
481
|
+
contract = DynamicModelChoiceField(queryset=Contract.objects.all(), selector=True)
|
|
462
482
|
|
|
463
483
|
class Meta:
|
|
464
484
|
model = ContractAssignment
|
|
@@ -469,9 +489,12 @@ class ContractAssignmentForm(NetBoxModelForm):
|
|
|
469
489
|
}
|
|
470
490
|
|
|
471
491
|
|
|
472
|
-
class
|
|
492
|
+
class ContractAssignmentFilterForm(NetBoxModelFilterSetForm):
|
|
473
493
|
model = ContractAssignment
|
|
474
|
-
contract = DynamicModelChoiceField(
|
|
494
|
+
contract = DynamicModelChoiceField(
|
|
495
|
+
queryset=Contract.objects.all(),
|
|
496
|
+
selector=True,
|
|
497
|
+
)
|
|
475
498
|
|
|
476
499
|
|
|
477
500
|
class ContractAssignmentImportForm(NetBoxModelImportForm):
|
|
@@ -492,9 +515,9 @@ class ContractAssignmentImportForm(NetBoxModelImportForm):
|
|
|
492
515
|
|
|
493
516
|
|
|
494
517
|
class InvoiceLineForm(NetBoxModelForm):
|
|
495
|
-
invoice = DynamicModelChoiceField(queryset=Invoice.objects.all())
|
|
518
|
+
invoice = DynamicModelChoiceField(queryset=Invoice.objects.all(), selector=True)
|
|
496
519
|
accounting_dimensions = DynamicModelMultipleChoiceField(
|
|
497
|
-
queryset=AccountingDimension.objects.all(), required=False
|
|
520
|
+
queryset=AccountingDimension.objects.all(), required=False, selector=True
|
|
498
521
|
)
|
|
499
522
|
|
|
500
523
|
def clean(self):
|
|
@@ -527,11 +550,17 @@ class InvoiceLineForm(NetBoxModelForm):
|
|
|
527
550
|
]
|
|
528
551
|
|
|
529
552
|
|
|
530
|
-
class
|
|
553
|
+
class InvoiceLineFilterForm(NetBoxModelFilterSetForm):
|
|
531
554
|
model = InvoiceLine
|
|
532
|
-
invoice = DynamicModelChoiceField(
|
|
555
|
+
invoice = DynamicModelChoiceField(
|
|
556
|
+
queryset=Invoice.objects.all(),
|
|
557
|
+
required=False,
|
|
558
|
+
selector=True,
|
|
559
|
+
)
|
|
533
560
|
accounting_dimensions = DynamicModelMultipleChoiceField(
|
|
534
|
-
queryset=AccountingDimension.objects.all(),
|
|
561
|
+
queryset=AccountingDimension.objects.all(),
|
|
562
|
+
required=False,
|
|
563
|
+
selector=True,
|
|
535
564
|
)
|
|
536
565
|
currency = forms.ChoiceField(choices=CurrencyChoices, required=False)
|
|
537
566
|
tag = TagFilterField(model)
|
|
@@ -564,7 +593,9 @@ class InvoiceLineImportForm(NetBoxModelImportForm):
|
|
|
564
593
|
class InvoiceLineBulkEditForm(NetBoxModelBulkEditForm):
|
|
565
594
|
invoice = DynamicModelChoiceField(queryset=Invoice.objects.all(), required=False)
|
|
566
595
|
accounting_dimensions = DynamicModelMultipleChoiceField(
|
|
567
|
-
queryset=AccountingDimension.objects.all(),
|
|
596
|
+
queryset=AccountingDimension.objects.all(),
|
|
597
|
+
required=False,
|
|
598
|
+
selector=True,
|
|
568
599
|
)
|
|
569
600
|
model = InvoiceLine
|
|
570
601
|
|
|
@@ -584,7 +615,7 @@ class AccountingDimensionForm(NetBoxModelForm):
|
|
|
584
615
|
]
|
|
585
616
|
|
|
586
617
|
|
|
587
|
-
class
|
|
618
|
+
class AccountingDimensionFilterForm(NetBoxModelFilterSetForm):
|
|
588
619
|
model = AccountingDimension
|
|
589
620
|
|
|
590
621
|
name = forms.CharField(required=False)
|
|
@@ -52,6 +52,7 @@ class CurrencyChoices(ChoiceSet):
|
|
|
52
52
|
('chf', 'CHF'),
|
|
53
53
|
]
|
|
54
54
|
|
|
55
|
+
CURRENCY_DEFAULT = CurrencyChoices.CHOICES[0][0]
|
|
55
56
|
|
|
56
57
|
class AccountingDimension(NetBoxModel):
|
|
57
58
|
name = models.CharField(max_length=20)
|
|
@@ -151,7 +152,7 @@ class Contract(NetBoxModel):
|
|
|
151
152
|
help_text='In month', default=12, blank=True, null=True
|
|
152
153
|
)
|
|
153
154
|
currency = models.CharField(
|
|
154
|
-
max_length=3, choices=CurrencyChoices, default=
|
|
155
|
+
max_length=3, choices=CurrencyChoices, default=CURRENCY_DEFAULT
|
|
155
156
|
)
|
|
156
157
|
accounting_dimensions = models.JSONField(null=True, blank=True)
|
|
157
158
|
yrc = models.DecimalField(
|
|
@@ -207,7 +208,7 @@ class Invoice(NetBoxModel):
|
|
|
207
208
|
period_start = models.DateField(blank=True, null=True)
|
|
208
209
|
period_end = models.DateField(blank=True, null=True)
|
|
209
210
|
currency = models.CharField(
|
|
210
|
-
max_length=3, choices=CurrencyChoices, default=
|
|
211
|
+
max_length=3, choices=CurrencyChoices, default=CURRENCY_DEFAULT
|
|
211
212
|
)
|
|
212
213
|
accounting_dimensions = models.JSONField(null=True)
|
|
213
214
|
amount = models.DecimalField(max_digits=10, decimal_places=2)
|
|
@@ -236,7 +237,7 @@ class InvoiceLine(NetBoxModel):
|
|
|
236
237
|
to='Invoice', on_delete=models.CASCADE, related_name='invoicelines'
|
|
237
238
|
)
|
|
238
239
|
currency = models.CharField(
|
|
239
|
-
max_length=3, choices=CurrencyChoices, default=
|
|
240
|
+
max_length=3, choices=CurrencyChoices, default=CURRENCY_DEFAULT
|
|
240
241
|
)
|
|
241
242
|
amount = models.DecimalField(max_digits=10, decimal_places=2)
|
|
242
243
|
accounting_dimensions = models.ManyToManyField(AccountingDimension, blank=True)
|
|
@@ -42,7 +42,7 @@ class ServiceProviderListView(generic.ObjectListView):
|
|
|
42
42
|
queryset = ServiceProvider.objects.all()
|
|
43
43
|
table = tables.ServiceProviderListTable
|
|
44
44
|
filterset = filtersets.ServiceProviderFilterSet
|
|
45
|
-
filterset_form = forms.
|
|
45
|
+
filterset_form = forms.ServiceProviderFilterForm
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
class ServiceProviderEditView(generic.ObjectEditView):
|
|
@@ -84,7 +84,7 @@ class ContractAssignmentListView(generic.ObjectListView):
|
|
|
84
84
|
queryset = ContractAssignment.objects.all()
|
|
85
85
|
table = tables.ContractAssignmentListTable
|
|
86
86
|
filterset = filtersets.ContractAssignmentFilterSet
|
|
87
|
-
filterset_form = forms.
|
|
87
|
+
filterset_form = forms.ContractAssignmentFilterForm
|
|
88
88
|
actions = {
|
|
89
89
|
'import': {'add'},
|
|
90
90
|
'export': set(),
|
|
@@ -184,7 +184,7 @@ class ContractListView(generic.ObjectListView):
|
|
|
184
184
|
)
|
|
185
185
|
table = tables.ContractListTable
|
|
186
186
|
filterset = filtersets.ContractFilterSet
|
|
187
|
-
filterset_form = forms.
|
|
187
|
+
filterset_form = forms.ContractFilterForm
|
|
188
188
|
|
|
189
189
|
|
|
190
190
|
class ContractEditView(generic.ObjectEditView):
|
|
@@ -270,7 +270,7 @@ class InvoiceListView(generic.ObjectListView):
|
|
|
270
270
|
queryset = Invoice.objects.all()
|
|
271
271
|
table = tables.InvoiceListTable
|
|
272
272
|
filterset = filtersets.InvoiceFilterSet
|
|
273
|
-
filterset_form = forms.
|
|
273
|
+
filterset_form = forms.InvoiceFilterForm
|
|
274
274
|
|
|
275
275
|
|
|
276
276
|
class InvoiceEditView(generic.ObjectEditView):
|
|
@@ -377,7 +377,7 @@ class InvoiceLineListView(generic.ObjectListView):
|
|
|
377
377
|
queryset = InvoiceLine.objects.all()
|
|
378
378
|
table = tables.InvoiceLineListTable
|
|
379
379
|
filterset = filtersets.InvoiceLineFilterSet
|
|
380
|
-
filterset_form = forms.
|
|
380
|
+
filterset_form = forms.InvoiceLineFilterForm
|
|
381
381
|
|
|
382
382
|
|
|
383
383
|
class InvoiceLineEditView(generic.ObjectEditView):
|
|
@@ -453,7 +453,7 @@ class AccountingDimensionListView(generic.ObjectListView):
|
|
|
453
453
|
queryset = AccountingDimension.objects.all()
|
|
454
454
|
table = tables.AccountingDimensionListTable
|
|
455
455
|
filterset = filtersets.AccountingDimensionFilterSet
|
|
456
|
-
filterset_form = forms.
|
|
456
|
+
filterset_form = forms.AccountingDimensionFilterForm
|
|
457
457
|
|
|
458
458
|
|
|
459
459
|
class AccountingDimensionEditView(generic.ObjectEditView):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: netbox-contract
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.8
|
|
4
4
|
Summary: Contract management plugin for Netbox
|
|
5
5
|
Author-email: Marc Lebreuil <marc@famillelebreuil.net>
|
|
6
6
|
Project-URL: Homepage, https://github.com/mlebreuil/netbox-contract
|
|
@@ -73,13 +73,14 @@ PLUGINS_CONFIG = {
|
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
* top_level_menu : If "Contracts" appears under the "Plugins" menu item or on its own
|
|
76
|
-
* default_accounting_dimensions: The accounting dimensions which will appear in the field' background when empty.
|
|
76
|
+
* default_accounting_dimensions: The accounting dimensions which will appear in the field' background when empty. Note that accounting dimensions are now managed as individual objects. The use of this field is deprecated.
|
|
77
77
|
* mandatory_contract_fields, mandatory_invoice_fields: Fields which are not required by default and can be set as such. The list of fields is at the bottom of the contract import form.
|
|
78
78
|
* hidden_contract_fields, hidden_invoice_fields: List of fields to be hidden. Fields should not be required to be hidden.
|
|
79
79
|
|
|
80
80
|
### Customize the plugin fields choices
|
|
81
81
|
|
|
82
82
|
Internal partie reference the legal entity of your organization that is a partie to the contract.
|
|
83
|
+
The first currency will also be the default currency for contracts.
|
|
83
84
|
|
|
84
85
|
```python
|
|
85
86
|
# configuration.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0001_initial.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0007_invoice_date.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract/migrations/0027_invoiceline.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_contract-2.2.7 → netbox_contract-2.2.8}/src/netbox_contract.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|