Skip to content

Commit

Permalink
Merge pull request #3882 from allegro/fix-invoice-report-action
Browse files Browse the repository at this point in the history
Fix invoice report action missing because of changes in django 2.2
  • Loading branch information
hipek8 authored Feb 14, 2025
2 parents faafffb + c37b2e5 commit 6d8f84f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/ralph/back_office/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ class BackOfficeAssetAdmin(

add_form_template = "backofficeasset/add_form.html"
form = BackOfficeAssetAdminForm
actions = ["bulk_edit_action"]
actions = ["bulk_edit_action", "invoice_report"]

show_transition_history = True
change_views = [
BackOfficeAssetLicence,
Expand Down
3 changes: 2 additions & 1 deletion src/ralph/data_center/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@ class DataCenterAssetAdmin(
"""Data Center Asset admin class."""

add_form_template = "data_center/datacenterasset/add_form.html"
actions = ["bulk_edit_action"]
actions = ["bulk_edit_action", "invoice_report"]

change_views = [
DataCenterAssetComponents,
DataCenterAssetNetworkView,
Expand Down
2 changes: 1 addition & 1 deletion src/ralph/licences/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class LicenceAdmin(
):
"""Licence admin class."""

actions = ["bulk_edit_action"]
actions = ["bulk_edit_action", "invoice_report"]
form = LicenseAdminForm
change_views = [
BaseObjectLicenceView,
Expand Down
5 changes: 0 additions & 5 deletions src/ralph/sim_cards/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ class SIMCardAdmin(
BulkEditChangeListMixin,
RalphAdminMixin,
):
# NOTE(Anna Gabler): list_display - list on top page
# raw_id_fields - fancy autocomplete
# list_select_related - join to database (DJANGO)
# list_filter - list of filters on simcard list
# fieldsets - configuration of editor layout
form = SIMCardForm
actions = ["bulk_edit_action"]
show_transition_history = True
Expand Down

0 comments on commit 6d8f84f

Please sign in to comment.