[7.0/stock] Enabling 'Group By' for Delivery Orders shows error

Bug #1167393 reported by Egor Tsinko
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Committed
Medium
OpenERP R&D Addons Team 2

Bug Description

Steps to reproduce:

1. Create a new database with demo data

2. Install 'Warehouse' module

3. Enable Usability/Multi Company for Administrator

4. Edit Demo User and change the following fields:
- add 'Your Company, Birmingham shop' to Allowed Companies in Access Rights Tab
- change Company from 'Your Company' to 'Your Company, Birmingham shop'

5. As admin go to Warehouse/Delivery orders and create 2 delivery orders (doesn't matter to which partner and what goods):
- set Company = 'Your Company' for one
- set Company = 'Your Company, Birmingham Shop' for another

6. Logout and login as demo user

7. Go to Warehouse/Delivery Order and observe that there is only one order visible (the one that has 'Your Company, Birmingham Shop' as Company)

8. In search box click on any field in 'Group By..." category and observe the following error:
"""
Access Denied

The requested operation cannot be completed due to security restrictions. Please contact your system administrator.

(Document type: Picking List, Operation: read)
"""

Some explanation.
From what I've seen this happens because orm method read_group() calls _apply_ir_rules() which is supposed to add record rules to the query (in this case filter out by the user's company) but there are no access rules for 'stock.picking.out' and rules for 'stock.picking' are not used here.

Related branches

Changed in openobject-addons:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Nimesh Contractor(Open ERP) (nco-openerp) wrote :

Hello,

  It has been fixed in https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1167393-nco branch.
  Revision No: 8696.
  Revision ID: <email address hidden>

Thanks.

Changed in openobject-addons:
status: In Progress → Fix Committed
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.