Odoo Help

Welcome!

This community 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.

1

Why can not create issues in portal ?

By
Marc Cassuto
on 7/25/13, 5:12 PM 2,421 views

Hi,

after installing module portal_project_issue, I discover a user can only see issues that are assigned to him... but he can not create new ones...

I granted Write and Create rights on project.issues to portal group... It does make the job but all the issue's fields remain hidden.

Is there a module to do this properly ?

1
Eckhard Schwarzat
On 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:

                        <group>
                        <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"/>
                        </div>
                    </group>

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"/>
                    </page>

and the statement in the inherited view:

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

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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 7/25/13, 5:12 PM
Seen: 2421 times
Last updated: 3/16/15, 8:10 AM