Skip to content

Commit

Permalink
Merge pull request #87 from mlebreuil/develop
Browse files Browse the repository at this point in the history
v2.0.7
  • Loading branch information
mlebreuil authored Aug 23, 2023
2 parents e211f8d + d0353c7 commit feb0653
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 20 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,7 @@ Add support for Netbox 3.5 which become the minimum version supported to accomod
* Remove the 'add' actions from the contract assignment list view

#### version 2.0.6
* [#80](https://github.com/mlebreuil/netbox-contract/issues/80) fFix missing fields in the API.
* [#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.
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.6"
version = "2.0.7"
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.6'
version = '2.0.7'
author = 'Marc Lebreuil'
author_email = '[email protected]'
base_url = 'contracts'
Expand Down
2 changes: 1 addition & 1 deletion src/netbox_contract/filtersets.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ContractFilterSet(NetBoxModelFilterSet):

class Meta:
model = Contract
fields = ('id', 'external_partie', 'internal_partie', 'status','parent','circuit')
fields = ('id', 'external_partie', 'internal_partie', 'status','parent')

def search(self, queryset, name, value):
return queryset.filter( Q(name__icontains=value)
Expand Down
14 changes: 5 additions & 9 deletions src/netbox_contract/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ class ContractFilterSetForm(NetBoxModelFilterSetForm):
choices=StatusChoices,
required= False
)
circuit = DynamicModelMultipleChoiceField(
queryset=Circuit.objects.all(),
required=False
)
parent=DynamicModelChoiceField(
queryset=Contract.objects.all(),
required=False
Expand Down Expand Up @@ -112,9 +108,9 @@ class ContractCSVForm(NetBoxModelImportForm):
class Meta:
model = Contract
fields = [
'name', 'external_partie', 'internal_partie', 'external_reference','tenant', 'status',
'start_date', 'end_date','initial_term', 'renewal_term', 'mrc', 'nrc',
'invoice_frequency', 'documents', 'comments', 'parent'
'name', 'external_partie', 'external_reference', 'internal_partie', 'tenant', 'status',
'start_date', 'end_date','initial_term', 'renewal_term', 'currency', 'accounting_dimensions',
'mrc', 'nrc','invoice_frequency', 'documents', 'comments', 'parent'
]

class ContractBulkEditForm(NetBoxModelBulkEditForm):
Expand Down Expand Up @@ -159,8 +155,8 @@ class InvoiceCSVForm(NetBoxModelImportForm):
class Meta:
model = Invoice
fields = [
'number', 'date', 'contracts','period_start', 'period_end',
'amount', 'tags'
'number','date','contracts','period_start', 'period_end',
'currency','accounting_dimensions','amount','documents','comments','tags'
]

class InvoiceBulkEditForm(NetBoxModelBulkEditForm):
Expand Down
13 changes: 6 additions & 7 deletions src/netbox_contract/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,16 @@ class ContractListTable(NetBoxTable):
external_partie = tables.Column(
linkify=True
)
circuit = tables.ManyToManyColumn()
parent = tables.Column(
linkify=True
)

class Meta(NetBoxTable.Meta):
model = Contract
fields = ('pk', 'id', 'name', 'circuit', 'external_partie',
'external_reference','internal_partie', 'status', 'mrc',
'parent','comments', 'actions')
default_columns = ('name', 'status', 'parent','circuit')
fields = ('pk', 'id','name', 'external_partie', 'external_reference', 'internal_partie', 'tenant', 'status',
'start_date', 'end_date','initial_term', 'renewal_term', 'currency', 'accounting_dimensions',
'mrc', 'nrc','invoice_frequency', 'documents', 'comments', 'parent','actions')
default_columns = ('name', 'status', 'parent')

class ContractListBottomTable(NetBoxTable):
name = tables.Column(
Expand All @@ -101,8 +100,8 @@ class InvoiceListTable(NetBoxTable):

class Meta(NetBoxTable.Meta):
model = Invoice
fields = ('pk', 'id', 'number', 'date', 'contracts', 'period_start',
'period_end', 'amount', 'actions')
fields = ('pk', 'id', 'number', 'date', 'contracts','period_start', 'period_end',
'currency','accounting_dimensions','amount', 'documents','comments', 'actions')
default_columns = ('number', 'date', 'contracts', 'period_start', 'period_end', 'amount')


Expand Down

0 comments on commit feb0653

Please sign in to comment.