在odoo中,用户无法从对象read and write
中读取
他在集团仓库/经理拥有权利:sale.order
在[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(Console)
>>> so=self.pool.get('sale.order').browse(self._cr, 60, 100)
>>> so.name
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/opt/odoo/odoo/openerp/fields.py", line 820, in __get__
self.determine_value(record)
File "/opt/odoo/odoo/openerp/fields.py", line 913, in determine_value
record._prefetch_field(self)
File "/opt/odoo/odoo/openerp/api.py", line 266, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/odoo/openerp/models.py", line 3246, in _prefetch_field
result = self.read(list(fnames), load='_classic_write')
File "/opt/odoo/odoo/openerp/api.py", line 266, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/odoo/openerp/models.py", line 3191, in read
values[name] = field.convert_to_read(record[name], use_name_get)
File "/opt/odoo/odoo/openerp/models.py", line 5641, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/opt/odoo/odoo/openerp/fields.py", line 813, in __get__
return record._cache[self]
File "/opt/odoo/odoo/openerp/models.py", line 6024, in __getitem__
return value.get() if isinstance(value, SpecialValue) else value
File "/opt/odoo/odoo/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: sale.order, Operation: read)')
上
我在shell中得到了这个:
showBluetoothAccessoryPickerWithNameFilter
你对这个问题有什么看法吗?
答案 0 :(得分:2)
以下是Odoo中访问权限的规则。
Global rules are subtractive, they must all be matched for a record to be accessible
Group rules are additive, if any of them matches (and all global rules match) then the record is accessible
所以你基本上需要做的是:
前往设置 - &gt;安全 - &gt;记录规则使用搜索来搜索&#34;对象包含sale.order&#34;
现在尝试激活/取消激活某些规则,看看哪一个导致问题。根据我的记忆,有一条规则不允许用户查看他没有创建的订单。
从那里开始