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

How to make One2Many widget "unclickable"

By
micromanc3r
on 4/10/13, 12:30 PM 3,389 views

Hi, I'm trying to make a custom view for users with very limited access rights that contains a One2Many widget. The widget is readOnly so they can't edit anything but the problem is that they can still click on the lines and the detail is shown with more information, that they should not be able to see. It would be fine if the lines of widget were text lines..is it possible?

(I'm using OpenERP 6.1)

3

Francesco OpenCode

--Francesco OpenCode--
3608
| 5 7 9
Grottaglie, Italy
--Francesco OpenCode--

Italian Odoo (OpenERP) Modules Developer LINKEDIN: http://www.linkedin.com/in/francescoapruzzese

Francesco OpenCode
On 4/10/13, 1:19 PM

Set the one2many field as readonly and nobody will can use it.

<field name="your_o2m" readonly="1" />

as I said...it already is readonly, but users are still able to click on the lines and popup with details is shown....which I want to forbid

micromanc3r
on 4/10/13, 1:28 PM

Set the o2m as editable so it doesn't show any popup. <field name="your_o2m" readonly="1" editable="top"/>

Francesco OpenCode
on 4/10/13, 3:39 PM
0
Hamza YAYA
On 4/1/16, 7:02 AM

Hi (i'm new in Odoo) i think i found a workaround. Instead of remove the "clickable" behavior, i redefined the view form for this field. By this way i can filter what the user can see!

In this example, i want to show only  the field "name", and "facture_id" of my model Facture; i dont want people to see the price and other field when they clicked on field facture_ids.

So here is my code : 

<field name="facture_ids" widget="one2many_list"  readonly="1" >

    <tree editable="top">

        <field name="patient"/>

        <field name="facture_id" />

    </tree>

    <form>

        <sheet>

            <field name="name"/>

            <field name="facture_id" />

        </sheet>

    </form>

</field>

0
fussions
On 4/25/14, 5:58 AM

I think it's not possible. For workaround I use functional field with type='char' to only show the value of original field. I make functional field visible for users with limited access rights and invisible for normal users and vice versa visibility for original field.

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: 4/10/13, 12:30 PM
Seen: 3389 times
Last updated: 4/1/16, 7:02 AM