Skip to content

Commit

Permalink
Merge pull request #181 from mlebreuil/176-sort-dimensions-in-the-con…
Browse files Browse the repository at this point in the history
…tract-and-invoice-view-alphabetically

Order accounting dimensions in tables
  • Loading branch information
mlebreuil authored Sep 8, 2024
2 parents 443359e + 4d76d15 commit 6961c90
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@

### Version 2.2.5

* [178](https://github.com/mlebreuil/netbox-contract/issues/178) Add the possibility to filter on invoice number, and contract name through the API.
* Generally improve filtering options
* [178](https://github.com/mlebreuil/netbox-contract/issues/178) Add the possibility to filter on invoice number, and contract name through the API.
* [176](https://github.com/mlebreuil/netbox-contract/issues/176) Order accounting dimensions in tables alphabetically.

### Version 2.2.4

Expand Down
4 changes: 3 additions & 1 deletion src/netbox_contract/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ class Meta(NetBoxTable.Meta):

class InvoiceLineListTable(NetBoxTable):
invoice = tables.Column(linkify=True)
accounting_dimensions = tables.ManyToManyColumn(linkify=True)
accounting_dimensions = tables.ManyToManyColumn(
linkify=True, filter=lambda qs: qs.order_by('name')
)

class Meta(NetBoxTable.Meta):
model = InvoiceLine
Expand Down

0 comments on commit 6961c90

Please sign in to comment.