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) andbroker_agency_id
in Hemnet. If customer already has a Hemnet account they can email[email protected]
to receivebroker_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
[email protected]
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.
Backend¶
- Run
poetry add limepkg-hemnet
to add the package as a dependency in your solution'spyproject.toml
file. - Add decorators to limeobject classes mapped to
project
,project unit
andshowing unit
and limeobject classespictures
andmiddle_picture
(see examples below). - Build and deploy your solution.
- 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¶
- Add the module
AO_Hemnet
. - Compile the VBA and make sure you do not get any errors.
- Save the VBA.
Lime Bootstrap App and Actionpad¶
- Copy the
plugin-hemnet
folder in the apps catalog to the subfolderapps
in the Actionpad folder. -
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>
-
Publish the Actionpads.