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.

0

Security File Issue

By
Ayyappan
on 3/23/15, 1:50 AM 462 views

I have created new add-on as like as survey add-on. In form view i have a partner field. Module consist 3 level of groups,

  • Head Manager(admin)

  • Manager

  • User

If i am logged in as a manager and print the report, i am getting below warning,

"AccessError: ('AccessError', u'The requested operation cannot be completed due to security restrictions. Please contact your system administrator.\n\n(Document type: res.partner, Operation: read)') "

My rules are:

Manager:

<record model="res.groups" id="base.group_survey_manager">

<field name="name">Custom Survey  Manager</field>

<field name="implied_ids" eval="[(4, ref('base.group_survey_user'))]"/>

<field name="users" eval="[(4, ref('base.user_root'))]"/>

</record>

-----------------------------------------------------------------------------------

<record id="project_survey_manager_access" model="ir.rule">

<field name="name">Survey Manager access rights</field>

<field name="model_id" ref="custom_survey.model_custom_project_survey"/>

<field name="domain_force">[(1, '=', 1)]</field>

<field name="groups" eval="[(4, ref('base.group_survey_manager'))]"/>

<field eval="1" name="perm_unlink"/>

<field eval="1" name="perm_write"/>

<field eval="1" name="perm_read"/>

<field eval="1" name="perm_create"/>

</record>


Partner Form Security:

<record id="partner_list_access" model="ir.rule">

<field name="name">Access to the manager to list related partners</field>

<field name="model_id" ref="custom_survey.model_res_partner"/>

<field name="domain_force">['|','|',('create_uid', '=', user.id),('user_ids', '=', user.id),('user_id', '=', user.id)]</field>

<field name="groups" eval="[(4, ref('base.group_survey_manager'))]"/>

<field eval="1" name="perm_unlink"/>

<field eval="1" name="perm_write"/>

<field eval="1" name="perm_read"/>

<field eval="1" name="perm_create"/>

</record>

If the manager is logged-in, i would like to list the partner who is created by the current manager. That's why i added the partner rule.

How to solve this issue?

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

1 follower(s)

Stats

Asked: 3/23/15, 1:50 AM
Seen: 462 times
Last updated: 3/23/15, 2:01 AM