OdooWiki OCA HUB

Web Portal Properties

web_portal_properties folder_open OCA/web open_in_new
Uncategorised License: AGPL-3

This module creates a new field that can be used to add a new parameter on field property description. This parameter will allow us to show some parameters on portal view.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Adds a new property field type whose definition includes a "Display in Portal" option, so chosen properties can be shown to portal users through a reusable portal template.

This module extends Odoo's Properties field so that each property definition gains an extra option called "Display in Portal". When a user edits a property definition (the small popover where a property's name, type and options are set), a new checkbox labelled "Display in Portal" appears, with a help tooltip explaining that it controls whether the property is shown in portal views.

On the portal side, the module provides a reusable portal template named "Portal Properties". It reads the properties of a record and displays only those whose "Display in Portal" option is ticked, in a two-column layout. Each property is rendered according to its type: - many2one values show the related record's name; - selection values show the chosen option's label; - tags and many2many values appear as coloured badges; - booleans show a green check or a red cross; - dates, datetimes and floats are formatted with the appropriate widget (floats with two decimals); - other values are shown as plain text.

Technically it registers a new field widget called portal_properties in the backend, based on the standard Properties field, and extends the property definition popover with the new checkbox. The module depends on portal and does not add any new menus, models or scheduled actions; it only adds the field option, the popover checkbox and the portal display template that other modules or templates can reuse.

Depends on

portal

Required by other modules

Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 18.0

Just modify the definition field like

from odoo import models

from odoo.addons.web_portal_properties.fields import PortalPropertiesDefinition


class ProjectProject(models.Model):
    _inherit = "project.project"

    task_properties_definition = PortalPropertiesDefinition()

Then, use the widget portal_properties on your field to allow the edition for the user.

Finally, on the portal template add this snippet with the right parameters:

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
    <template id="portal_my_task" inherit_id="project.portal_my_task">
        <xpath expr="//div[@id='card_body']" position="inside">

            <t t-call="web_portal_properties.portal_properties">
                <t t-set="properties_record" t-value="task" />
                <t t-set="properties_field" t-value="'task_properties'" />
            </t>
        </xpath>
    </template>
</odoo>

On form view, we will be able to set a new parameter, Show in portal.

On portal, we will be able to see the parameters.

No verified information in OCA: Installation.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.