8. Steps to add a new HIP Asset

Adding an asset to the Home Investment Plan (HIP) means making it possible for contractors to suggest asset upgrades for homeowners using the HIP report.

The following steps are for allowing contractors (who have the correct view permissions) to create upgrade options from a specific asset:

  1. Create the upgrade option form of the asset in the latest scoring version package under hip/forms/.

  2. Add the new upgrade option form class to pearlcertification.hip.utils.hip_form_classes.get_upgrade_form_classes

  3. add the necessary generic relations and managers to the asset model

upgrade_options = GenericRelation('hip.UpgradeOption', related_query_name='solar_evs', related_name='solar_evs')
hip_asset = GenericRelation('hip.HipAsset', related_query_name='solar_evs', related_name='solar_evs')
objects = HomeAssetManager()
upgrades = UpgradeOptionManager()
  1. add the asset token to UpgradeOption.CERTIFICATION_CAT_GROUP_UPGRADES under hip/models.py

At this point contractors should be able to create upgrade options using the new asset from the admin interface to “Setup Home Investment Options” as well as link the upgrade options to an existing home asset in the “Home Investment Plan” page under “Pearl Reports & Certifications” menu.

Still, in the generated HIP report, asset details are represented by a list of asset characteristics (the same ones as in the Certification Report) that are added when certain conditions are verified. Asset characteristics are displayed in two places:

  • The summary page which includes only a small subset of asset characteristics of a certain asset.

  • The asset details page of each asset which includes all asset characteristics for a certain asset.

The following steps are for adding a new asset details in the hip report

1.add asset characteristic to hip/report/characteristics

2.add what needs to be shown in ‘in this report’ section by adding the specific asset characteristic in the right CRHIPAsset class

class CRHipSolarInverter(CRHipAsset):
    model = SolarInverter
    characteristics_classes = [HipTypeOfInverter]