From d9850fb6f4213b20d3965e279ada29e19e98a404 Mon Sep 17 00:00:00 2001 From: awieckowski Date: Tue, 5 Mar 2024 11:53:55 +0100 Subject: [PATCH] Display leasing rate and depreciation end date fields on frontend --- src/ralph/data_center/admin.py | 1 + .../migrations/0031_auto_20240304_1642.py | 19 +++++++++++++++++++ src/ralph/data_center/models/physical.py | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 src/ralph/data_center/migrations/0031_auto_20240304_1642.py diff --git a/src/ralph/data_center/admin.py b/src/ralph/data_center/admin.py index 201e79966f..943a461f5a 100644 --- a/src/ralph/data_center/admin.py +++ b/src/ralph/data_center/admin.py @@ -492,6 +492,7 @@ class DataCenterAssetAdmin( (_('Financial & Order Info'), { 'fields': ( 'order_no', 'invoice_date', 'invoice_no', 'task_url', 'price', + 'vendor_contract_number', 'leasing_rate', 'depreciation_rate', 'depreciation_end_date', 'force_depreciation', 'source', 'provider', 'delivery_date', 'budget_info', 'start_usage', 'get_created_date', diff --git a/src/ralph/data_center/migrations/0031_auto_20240304_1642.py b/src/ralph/data_center/migrations/0031_auto_20240304_1642.py new file mode 100644 index 0000000000..fbaf71125a --- /dev/null +++ b/src/ralph/data_center/migrations/0031_auto_20240304_1642.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('data_center', '0030_auto_20240221_1004'), + ] + + operations = [ + migrations.AlterField( + model_name='datacenterasset', + name='leasing_rate', + field=models.FloatField(verbose_name='Leasing rate', blank=True, null=True), + ), + ] diff --git a/src/ralph/data_center/models/physical.py b/src/ralph/data_center/models/physical.py index d1a10ede5a..798a84625d 100644 --- a/src/ralph/data_center/models/physical.py +++ b/src/ralph/data_center/models/physical.py @@ -470,7 +470,7 @@ class DataCenterAsset( leasing_rate = models.FloatField( null=True, blank=True, - verbose_name=_('Vendor contact number'), + verbose_name=_('Leasing rate'), ) slot_no = models.CharField( blank=True,