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

User with admin rights cant manage views

By
Eric
on 3/3/14, 5:25 PM 2,480 views

Hello, I have a user account which is supposed to have admin rights, but for some reason I cant manage a view when OpenERP is in developer mode. I can see a list of some options, but the Manage Views option is not available. If I log in as admin on a test database then the option shows up. Does anyone know what I need to do to allow my real user account to manage the views like the admin?

1
Eric
On 5/7/14, 3:05 PM

Hi everyone, I actually stumbled upon this answer when trying to figure out another problem lol. The problem exists in the base.xml file in the Web module. The path to this file is: addons/web/static/src/xml/base.xml

Search the file for "ViewManagerDebug" and you will see a section of code like this:

<t t-name="ViewManagerDebug">
<option value="">Debug View#<t t-esc="view.fields_view.view_id"/></option>
<t t-if="view_manager.active_view === 'form'">
    <option value="perm_read">View Log (perm_read)</option>
    <option value="toggle_layout_outline">Toggle Form Layout Outline</option>
    <option value="set_defaults">Set Defaults</option>
</t>
<option value="tests">JS Tests</option>
<option value="fields">View Fields</option>
<option value="fvg">Fields View Get</option>
<option value="manage_filters">Manage Filters</option>
<t t-if="view_manager.session.uid === 1">
    <option value="translate">Technical translation</option>
    <option value="manage_views">Manage Views</option>
    <option value="edit" data-model="ir.ui.view" t-att-data-id="view.fields_view.view_id">Edit <t t-esc="_.str.capitalize(view.fields_view.type)"/>View</option>
    <option t-if="view_manager.searchview" value="edit" data-model="ir.ui.view" t-att-data-id="view_manager.searchview.view_id">Edit SearchView</option>
    <option t-if="view_manager.action" value="edit" t-att-data-model="view_manager.action.type" t-att-data-id="view_manager.action.id">Edit Action</option>
    <option value="edit_workflow">Edit Workflow</option>
    <option value="print_workflow">Print Workflow</option>
</t>

</t>

About half way down that section you will see an opening tag:

<t t-if="view_manager.session.uid === 1">

Here you can change the test condition to allow another user to see the rest of the options on the menu

<t t-if="view_manager.session.uid === 1 or view_manager.session.uid === 2">

Note: I am using a Windows version for OpenERP

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: 3/3/14, 5:25 PM
Seen: 2480 times
Last updated: 3/16/15, 8:10 AM