Skip to content

Commit

Permalink
Merge pull request #92 from mlebreuil/91-changing-reference-from-netb…
Browse files Browse the repository at this point in the history
…ox-custom-multiplechoicefield-subclass-and-adding-currency

Remove MultipleChoiceFields update Readme
  • Loading branch information
mlebreuil authored Sep 3, 2023
2 parents feb0653 + fc44a3f commit 9473c8f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ FIELD_CHOICES = {
('Nagravision SARL', 'Nagravision SARL', 'green'),
('Nagra USA', 'Nagra USA', 'green'),
('Nagra India', 'Nagra India', 'green'),
),
'netbox_contract.Contract.currency': (
('usd', 'USD'),
('eur', 'EUR'),
('chf', 'CHF'),
('pln', 'PLN'),
),
'netbox_contract.Contract.status': (
('Active', 'Active', 'green'),
('Cancled', 'Canceled', 'red'),
)
}

Expand Down Expand Up @@ -104,4 +114,6 @@ Add support for Netbox 3.5 which become the minimum version supported to accomod
* [#80](https://github.com/mlebreuil/netbox-contract/issues/80) Fix missing fields in the API.

#### version 2.0.7
* [#85](https://github.com/mlebreuil/netbox-contract/issues/85) Fix missing fields contract and invoice import and export forms.
* [#85](https://github.com/mlebreuil/netbox-contract/issues/85) Fix missing fields contract and invoice import and export forms.

#### version 2.0.8
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "netbox-contract"
version = "2.0.7"
version = "2.0.8"
authors = [
{ name="Marc Lebreuil", email="[email protected]" },
]
Expand Down
2 changes: 1 addition & 1 deletion src/netbox_contract/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class ContractsConfig(PluginConfig):
name = 'netbox_contract'
verbose_name = 'Netbox contract'
description = 'Contract management plugin for Netbox'
version = '2.0.7'
version = '2.0.8'
author = 'Marc Lebreuil'
author_email = '[email protected]'
base_url = 'contracts'
Expand Down
4 changes: 2 additions & 2 deletions src/netbox_contract/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.contrib.contenttypes.models import ContentType
import django_filters
from netbox.forms import NetBoxModelForm, NetBoxModelFilterSetForm, NetBoxModelBulkEditForm, NetBoxModelImportForm
from utilities.forms.fields import CommentField, CSVChoiceField, DynamicModelChoiceField, DynamicModelMultipleChoiceField, MultipleChoiceField, CSVModelChoiceField, SlugField, CSVContentTypeField
from utilities.forms.fields import CommentField, CSVChoiceField, DynamicModelChoiceField, DynamicModelMultipleChoiceField, CSVModelChoiceField, SlugField, CSVContentTypeField
from utilities.forms.widgets import DatePicker
from extras.filters import TagFilter
from circuits.models import Circuit
Expand Down Expand Up @@ -66,7 +66,7 @@ class ContractFilterSetForm(NetBoxModelFilterSetForm):
internal_partie= forms.CharField(
required=False
)
status = MultipleChoiceField(
status = forms.ChoiceField(
choices=StatusChoices,
required= False
)
Expand Down

0 comments on commit 9473c8f

Please sign in to comment.