+
Skip to content

Conversation

etobella
Copy link
Member

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.

Configure

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>

Roadmap

It cannot be used on separators easily unless we duplicate some Odoo code or we ask for a hook on Odoo.

Usage

Example view of fields:

image

Example view on portal:

image

@etobella etobella force-pushed the 17.0-add-portal_properties branch from fceb259 to 6fa362e Compare September 19, 2025 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载