Feb 26, 2013

[SOLVED] Openerp 7 Access Denied by record rules for operation: create, model: res.partner

Here's the solution for  openerp 7 Access Denied by record rules for operation: create, model: res.partner.


Previously error as below :


openerp.osv.orm: Access Denied by record rules for operation: create, uid: 12, model: res.partner
2013-02-07 06:11:30,381 10987 ERROR latestonair openerp.netsvc: Access Denied
The requested operation cannot be completed due to security restrictions. Please contact your system administrator.

(Document type: Partner, Operation: create)
Traceback (most recent call last):
  File "/livesource/openerp7/openerp/netsvc.py", line 289, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/livesource/openerp7/openerp/service/web_services.py", line 614, in dispatch
    res = fn(db, uid, *params)
  File "/livesource/openerp7/openerp/osv/osv.py", line 169, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/livesource/openerp7/openerp/osv/osv.py", line 125, in wrapper
    raise except_osv(inst.name, inst.value)
except_osv: (u'Access Denied', u'The requested operation cannot be completed due to security restrictions. Please contact your system administrator.


 
SOLUTION : then you need to go "Record Rules", search "res.partner Company", then add your user group in it. see on pic : 

Openerp 7 Access Denied by record rules for operation: create, model: res.partner

Read more ...

[SOLVED] stock_move error openerp 7 ValueError: Invalid field 'message_follower_ids'

Just my note on solving stock_move error,  On openerp 7, you need to de-activate Rule "Portal Personal Stock Move".

previously its look error as below :


File "/home/febru/workspace/openerp7/openerp/osv/fields.py", line 1122, in get
    result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
  File "/home/febru/workspace/openerp7/openerp/addons/stock/product.py", line 36, in _stock_move_count
    ], ['product_id'], ['product_id'])
  File "/home/febru/workspace/openerp7/openerp/osv/orm.py", line 2619, in read_group
    self._apply_ir_rules(cr, uid, query, 'read', context=context)
  File "/home/febru/workspace/openerp7/openerp/osv/orm.py", line 4728, in _apply_ir_rules
    rule_where_clause, rule_where_clause_params, rule_tables = rule_obj.domain_get(cr, uid, self._name, mode, context=context)
  File "/home/febru/workspace/openerp7/openerp/addons/base/ir/ir_rule.py", line 156, in domain_get
    query = self.pool.get(model_name)._where_calc(cr, SUPERUSER_ID, dom, active_test=False)
  File "/home/febru/workspace/openerp7/openerp/osv/orm.py", line 4676, in _where_calc
    e = expression.expression(cr, user, domain, self, context)
  File "/home/febru/workspace/openerp7/openerp/osv/expression.py", line 632, in __init__
    self.parse(cr, uid, context=context)
  File "/home/febru/workspace/openerp7/openerp/osv/expression.py", line 806, in parse
    raise ValueError("Invalid field %r in leaf %r" % (left, str(leaf)))
ValueError: Invalid field 'message_follower_ids' in leaf "<osv.ExtendedLeaf: ('message_follower_ids', 'in', [7]) on stock_move (ctx: )>"

the solution is : 

go to Record Rule,  Search "Portal Personal Stock Move", then de-activate it.



Read more ...