# Eagle Estates - Addendum 2 (Portal)
We decided to add a portal to our App to allow tenants to access their quotations/invoices from Odoo's public portal. Now we need to make properties accessible from the portal as well. To achieve this, do the following:
# Mixin
- Add a new boolean field on properties to allow them to be published on the portal.
- Inherit the
portal.mixinmixin on the properties to make them accessible from the portal. - Override the
_compute_access_urlmethod to make our properties accessible via the/my/properties/URL
# Controllers
Extend the CustomerPortal class to do the following:
- Override the
_prepare_home_portal_valuesmethod to add a link to the properties list. - Add the following route methods to access our properties
portal_my_propertiesto list all the published properties.portal_my_propertyto display details of a single property.
# Templates
- Override the
portal.portal_my_hometemplate to add a link to the properties list. It should read as follows:- My Properties (COUNT) - A link to the
/my/properties/URL.
- My Properties (COUNT) - A link to the
- Define a template that will be rendered through the
portal_my_propertiesroute. The template should display the following details for each property:- Property Name
- Construction Date
- Property Area
- A link to the property details page. This view should also be searchable and include options to filter/group by construction date and property area.
- Define a template that will be rendered through the
portal_my_propertyroute. The template should display for any given property. It should inheritportal.portal_sidebarand be primary
← Translations Models →