Skip to content

Installation Instructions

The installation of limepkg-hemnet consists of:

  • Add fields in LISA
  • Adding the limepkg as a dependency to your solution
  • Configuring mapping in application_config
  • Add Actionpad app for the desktop client

Preparations

  • Check that the requirements are met.
  • Ask customer for server_dns (to lime server) and broker_agency_id in Hemnet. If customer already has a Hemnet account they can email integration@hemnet.se to receive broker_agency_id, otherwise they first need to get a Hemnet account.
  • If you want a test broker agency specifically for the customer application, send an email to integration@hemnet.se and ask them to generate a new broker agency for Limes test account (give them the broker_agency_id for the customer in production so that they can copy information from there).

LISA

Add fields as specified in technical. Lip package exists if the customer uses table names: - newproduction for project - apartment for projectunit/listing - viewing for showing.

API User and Group Setup

  1. In LISA, create new user with username apiuser@hemnet with the following settings:
  2. Password: Type a really long nonsense password. Do not store it anywhere (it is not needed).
  3. Type: Integration

  4. Create Hemnet group:

  5. Create new group named "Hemnet"
  6. Add apiuser@hemnet to the group

  7. Configure policies:

  8. Go to Security > Policies
  9. Add or edit tbl_picture
  10. Grant READ access to the "Hemnet" group
  11. Set policy tbl_picture to the table used for pictures

Backend

  1. Run poetry add limepkg-hemnet to add the package as a dependency in your solution's pyproject.toml file. This also installs limepkg-image-handling 2.x, which must be configured according to its own documentation.
  2. Add decorators to limeobject classes mapped to project, project unit and showing unit and limeobject classes pictures and middle_picture (see examples below).
  3. Build and deploy your solution.
  4. Restart service Lime CRM Web server.

Code example - decorator to limeobject class mappes to project

from lime_type.limeobjects import LimeObject
from limepkg_hemnet.decorators import project as hemnet_project


@hemnet_project()
class Newproduction(LimeObject):
    pass


def register_limeobject_classes(register_class):
    register_class("newproduction", Newproduction)

Code example - decorator to limeobject class mappes to project unit

from lime_type.limeobjects import LimeObject
from limepkg_hemnet.decorators import projectunit as hemnet_projectunit


@hemnet_projectunit()
class Apartment(LimeObject):
    pass


def register_limeobject_classes(register_class):
    register_class("apartment", Apartment)

Code example - decorator to limeobject class mappes to showing unit

from lime_type.limeobjects import LimeObject
from limepkg_hemnet.decorators import showingunit as hemnet_showingunit


@hemnet_showingunit()
class Viewing(LimeObject):
    pass


def register_limeobject_classes(register_class):
    register_class("viewing", Viewing)

Code example - decorator to limeobject class pictures

from lime_type.limeobjects import LimeObject
from limepkg_hemnet.decorators import pictures as hemnet_pictures


@hemnet_pictures()
class Pictures(LimeObject):
    pass


def register_limeobject_classes(register_class):
    register_class("pictures", Pictures)

Code example - decorator to limeobject class middle_picture

from lime_type.limeobjects import LimeObject
from limepkg_hemnet.decorators import middle_picture as hemnet_middlepicture


@hemnet_middlepicture()
class MiddlePicture(LimeObject):
    pass


def register_limeobject_classes(register_class):
    register_class("middle_picture", MiddlePicture)

Desktop client

VBA

  1. Add the module AO_Hemnet.
  2. Compile the VBA and make sure you do not get any errors.
  3. Save the VBA.

Lime Bootstrap App and Actionpad

  1. Copy the plugin-hemnet folder in the apps catalog to the subfolder apps in the Actionpad folder.
  2. Add the instantiation of the app to the Actionpads where the publish/unpublish functions should be used (as shown below). Replace values in config that you see below.

    <div data-app="{
        app:'plugin-hemnet',
        config:{
            'projectLimetype': '<insert your limetype here>',
            'unitLimetype': '<insert your limetype here>',
            'showingUnitLimetype': '<insert your limetype here>'
        }
    }"></div>
    
  3. Publish the Actionpads.

Back to top