[Trunk/7.0] groups on search view don't work

Bug #1122183 reported by Yannick Vaucher @ Camptocamp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Web Team

Bug Description

I tried to use a group in a search view to hide some search function that some users shouldn't be able to use. (eg. a user shouldn't be able to filter on a field he doesn't see in form and tree view)

This has no effects.

In addons, I saw that webdav module is using it so here is how to reproduce using this module:

- install document_webdav
- create a user with all rights but technical features.
- remove groups on menu (and its parents):
  Knowledge/Configuration/Document Management/DAV Properties/Documents

Now log in with the created user to check what you see in search view. According to xml file webdav_view.xml on line 134:

                    <group expand="0" string="Group By..." groups="base.group_no_one">

What you see and shouldn't are "Group By...", "Document" and "Namespace" filters.

An other place where groups are set in addons is in hr_evaluation/hr_evaluation_view.xml

Was this functionality removed? Please restore this.

Related branches

summary: - [7.0] groups on search view don't work
+ [Trunk/7.0] groups on search view don't work
Changed in openerp-web:
status: New → Confirmed
assignee: nobody → OpenERP R&D Web Team (openerp-dev-web)
importance: Undecided → Medium
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

> Was this functionality removed?

Not intentionally, it seems it was missed when the search view was reimplemented.

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Ok, thanks for your confirmation Xavier

So I will wait for it's re implementation :-)

Changed in openerp-web:
status: Confirmed → In Progress
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Linked branch ought fix it, if you want to test it (locally or on the runbot).

Changed in openerp-web:
status: In Progress → Fix Committed
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Thanks, I tested it and it worked fine locally.

I just wander about whether or not the user should see and/or remove an activated filter which is unavailable (invisible) for him in the filter list.

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

> I just wander about whether or not the user should see and/or remove an activated filter which is unavailable (invisible) for him in the filter list.

So you'd have invisible filters w/ defaults essentially be user-specific "action domain", a domain applied to all searches of the user which he can't alter or remove?

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

I don't have a particular need about it, I just felt it was strange while I was testing with the "Customer" boolean filter on partner.

What seemed strange to me was to actually see a filter and being able to remove it. If you can't activate it, why would you be able to disable it?

It might be a good idea to make it also invisible or disable the filter at least it shouldn't be changed as the groups is the to hide it's functionality.

The main use case I see is that you want to hide some filters to low level users to have simplified views for them. So if they don't have to use a filter, I think it should have no effect.

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

After discussing this with APR, I think it might be too much work and too much risk of bad side-effects for too little value: in-view field invisibility is only advisory (e.g. the field is still visible in advanced search). If you want to put implied non-removable filters, you should use the action (potentially via a server action generating a window action with the right domain & context).

As for removing the field altogether, that strikes me as going against the idea of "invisible", in all openerp views "invisible" means the field is there and active, just not shown.

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Ok thanks for having taken a look on that. I think your patch is still needed, though, and will be enough in order be able to set invisibility on search field. It is needed to be able to hide basic searches on fields that are not important for a group of users. Even if they can still use it with advanced search, it will be less confusing if simply not displayed in basic search fields.

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Fix merged in 7.0 as of revision <email address hidden>

Changed in openerp-web:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.