This question has been flagged




Hi.
When I tried to organize our company's warehouses/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. 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!




Here is the log file associated with this problem...

Traceback (most recent call last):

File "/opt/odoo/odoo-server/openerp/http.py", line 530, in handle_exception

return super(JsonRequest, self).handle_exception(exception)

File "/opt/odoo/odoo-server/openerp/http.py", line 567, in dispatch

result = self._call_function(*self.params)

File "/opt/odoo/odoo-server/openerp/http.py", line 303, in _call_function

return checked_call(self.db, *args, *kwargs)

File "/opt/odoo/odoo-server/openerp/service/model.py", line 113, in wrapper

return f(dbname, args, *kwargs)

File "/opt/odoo/odoo-server/openerp/http.py", line 300, in checked_call

return self.endpoint(a, *kw)

File "/opt/odoo/odoo-server/openerp/http.py", line 796, in __call

return self.method(args, *kw)

File "/opt/odoo/odoo-server/openerp/http.py", line 396, in response_wrap

response = f(args, *kw)

File "/opt/odoo/odoo-server/addons/web/controllers/main.py", line 940, in call_button

action = self.call_kw(model, method, args, {})

File "/opt/odoo/odoo-server/addons/web/controllers/main.py", line 928, in call_kw

return getattr(request.registry.get(model), method)(request.cr, request.uid, args, *kwargs)

File "/opt/odoo/odoo-server/openerp/api.py", line 241, in wrapper

return old_api(self, args, *kwargs)

File "/opt/odoo/odoo-server/addons/stock_account/stock_account.py", line 272, in action_done

res = super(stock_move, self).action_done(cr, uid, ids, context=context)

File "/opt/odoo/odoo-server/openerp/api.py", line 241, in wrapper

return old_api(self, args, *kwargs)

File "/opt/odoo/odoo-server/addons/stock/stock.py", line 2379, in action_done

quant_obj.quants_move(cr, uid, quants, move, ops.location_dest_id, location_from=ops.location_id, lot_id=ops.lot_id.id, owner_id=ops.owner_id.id, src_package_id=ops.package_id.id, dest_package_id=quant_dest_package_id, context=ctx)

File "/opt/odoo/odoo-server/openerp/api.py", line 241, in wrapper

return old_api(self, args, *kwargs)

File "/opt/odoo/odoo-server/addons/stock/stock.py", line 410, in quants_move

quant = self._quant_create(cr, uid, qty, move, lot_id=lot_id, owner_id=owner_id, src_package_id=src_package_id, dest_package_id=dest_package_id, force_location_from=location_from, force_location_to=location_to, context=context)

File "/opt/odoo/odoo-server/openerp/api.py", line 241, in wrapper

return old_api(self, args, *kwargs)

File "/opt/odoo/odoo-server/addons/stock_account/stock_account.py", line 155, in _quant_create

quant = super(stock_quant, self)._quant_create(cr, uid, qty, move, lot_id=lot_id, owner_id=owner_id, src_package_id=src_package_id, dest_package_id=dest_package_id, force_location_from=force_location_from, force_location_to=force_location_to, context=context)

File "/opt/odoo/odoo-server/openerp/api.py", line 241, in wrapper

return old_api(self, args, *kwargs)

File "/opt/odoo/odoo-server/addons/stock/stock.py", line 502, in _quant_create

rounding = move.product_id.uom_id.rounding

File "/opt/odoo/odoo-server/openerp/fields.py", line 823, 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)')

Can anyone help?
Regards,

Avatar
Discard

I'm also in the same trouble...

Author

Still no answer!!