Odoo Help


1 Answer
Eckhard Schwarzat United Kingdom
9/8/13, 2:33 PM

*The form view definition for project issues is the key*

A portal user belongs always to the portal user group and should never belong to the Human Resources / Employee group.

If you look closer at the xml definition of the Project Issue Tracker Form for example, you will see that quite a lot of fields, labels etc. have the groups="base.group_user" attribute. An example:

                        <field name="id"/>
                        <field name="version_id" groups="base.group_user"/>
                        <field name="priority" groups="base.group_user"/>
                        <label for="task_id" groups="base.group_user"/>
                        <div groups="base.group_user">
                            <field name="task_id" on_change="onchange_task_id(task_id)" class="oe_inline" context="{'default_project_id':project_id}"/>
                            <field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}" class="oe_inline"/>

If a user belongs to HR/Employee group than she is able to see these elements; HR / Employees is equal to base.group_user. However, if she is a portal user and therefore ought not be a member of the HR / Employees group these elements are not visible to her; Portal is equal to portal.group_portal.

In order to make these elements visible, you have to inherit the view in question and use the replace statements on the elements you want to make visible and add them again either without the groups= attribute (all users including portal users can see this element from now on [depending on ACL and Record Rules]) or with a groups="portal.group_portal" attribute to make it only visible to Portal users.

Here is an example section of the original project issue form view:

                        <page string="Description">
                        <field name="description" placeholder="Add an internal note..." groups="base.group_user"/>

and the statement in the inherited view:

                <page string="Description" position="replace">
                <page string="Description">
                    <field name="description" placeholder="Add a description..."/>

As mentioned earlier, in order to see fields you need to check ACL rules, Record rules, view definitions and if you still can't see a field for a particular user group even the python code itself, because with Version 7 we have now column level security which is applied on python code level.

Ask a Question
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now