Community mailing list archives

community@mail.odoo.com

Re: Strange error with record rules!!

by
Guru
- 05/07/2015 19:35:43
Thx Graeme for your contribution, but I think it is not about AND or OR. I tried to but a single condition in the record rule, and it popped up the same error!

On Fri, May 8, 2015 at 1:19 AM, Graeme Gellatly <gdgellatly@gmail.com> wrote:
I ran into this the other day after updating to latest.  It is a regression I think.  Basically AFAICT security rules are now all being AND ed instead of OR'ed for non Global rules.  Is only a guess as to fix I had to remove the user from groups that did not have write access.

On Fri, May 8, 2015 at 7:47 AM, Abu Helal <guru.abu.helal@gmail.com> wrote:

Is there any way to overcome this problem?

On May 7, 2015 1:12 PM, "Rami Talat" <rami.talat@gmail.com> wrote:
Dear Abu,
I tried what you described on a new database, and I found what you said!
Unfortunately, it seems a bug!


On Thu, May 7, 2015 at 11:48 AM, Abu Helal <guru.abu.helal@gmail.com> wrote:

Dear all,

Here is my scenario from scratch on a blank database:

  1. Installing these applications;

    1. Sales

    2. Purchase

    3. Warehouse

    4. Manufacturing

  2. In the warehouse settings, check these options

    1. Generate procurement in real time

    2. Manage multiple locations and warehouses

    3. Manage advanced routes for your warehouse

  3. Edit the warehouse to be 2-steps in, and 3-steps out.

  4. Create four groups, one for each location.

  5. Define the record rules for each group, on the stock.move object...

    Like this...

    #Finished Products

    ['&', ('location_id', 'ilike', 'Output'), '&', ('location_dest_id','ilike', 'Customers'), ('picking_type_id', 'ilike', 'Delivery Orders')]

  6. Create a store person for each location, and in his appropriate group.

  7. Check... :(

Is there anything wrong in this simple configuration?

On Thu, May 7, 2015 at 9:46 AM, Abu Helal <guru.abu.helal@gmail.com> wrote:
I use the advanced routes in my warehouse locations.
It is a single warehouse with 2-input and 3-output structure, with advanced routes between them.

On Thu, May 7, 2015 at 9:05 AM, Martin Trigaux <mat@odoo.com> wrote:

So it looks like you have a chained move (e.g. in a different warehouse) on which you don't have the access rights.
Your record rule is probably a bit too strict.

On 06/05/15 20:34, Abu Helal wrote:
<blockquote cite="mid:CABTM-pPuF-m53ZaZDqgz1E=LA_Ashhg2UnMw1xU2MMDwDn9deQ@mail.gmail.com" type="cite">
 File "/opt/odoo/odoo-server/addons/stock/stock.py", line 1963, in write
    old_move_date = datetime.strptime(move.move_dest_id.date_expected, DEFAULT_SERVER_DATETIME_FORMAT)
  File "/opt/odoo/odoo-server/openerp/fields.py", line 810, in __get__
    return record._cache[self]
  File "/opt/odoo/odoo-server/openerp/models.py", line 5913, in __getitem__
    return value.get() if isinstance(value, SpecialValue) else value
  File "/opt/odoo/odoo-server/openerp/fields.py", line 55, in get
    raise self.exception
AccessError: ('AccessError', u'The requested operation cannot be completed due to security restrictions. Please contact your system administrator.\n\n(Document type: stock.move, Operation: read)')
2015-05-06 18:27:23,034 1564 INFO whm werkzeug: 192.168.159.1 - - [06/May/2015 18:27:23] "POST /web/dataset/call_button HTTP/1.1" 200 -


On Wed, May 6, 2015 at 7:17 PM, Rami Talat <rami.talat@gmail.com> wrote:
Dear Abu,
Try to check log file for further info...

On Wed, May 6, 2015 at 7:03 PM, Abu Helal <guru.abu.helal@gmail.com> wrote:
Dear community,
Hi.
I tried to organize our company's warehouses and locations to the desired structure from our company's point of view to locations such that, (Input, Stock, Packing, and Output).
Then I defined a separate record rule for each location, to differentiate between each location moves and the others. Foe a while, everything was going well, but surprisingly, it get a strange error for the storekeeper ... 

"AccessError
The requested operation cannot be completed due to security restrictions. Please contact your system administrator.
(Document type: stock.move, Operation: read) "
From the first glance I expected that the record rule missed the read permission, but that was wrong. The record rules have the four permissions set!

Can anyone help?
Regards,
Abu

_______________________________________________


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


-- 
Martin Trigaux
Odoo (Formerly OpenERP)

Chaussée de Namur, 40
1367 Grand-Rosière
Tel: +32 81 81 37 00
http://odoo.com

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe



_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe