I get this error when i try to open a lead as user,
i had this domain rule in "Personal lead" record rule
['|',('user_id','=',user.id),('message_partner_ids','child_of',[user.commercial_partner_id.id])]
error:
Odoo Server ErrorTraceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 648, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 685, in dispatch result = self._call_function(**self.params) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 321, in _call_function return checked_call(self.db, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 118, in wrapper return f(dbname, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 314, in checked_call result = self.endpoint(*a, **kw) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 964, in __call__ return self.method(*args, **kw) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 514, in response_wrap response = f(*args, **kw) File "/media/sf_odoo/source/odoo/addons/web/controllers/main.py", line 888, in call_kw return self._call_kw(model, method, args, kwargs) File "/media/sf_odoo/source/odoo/addons/web/controllers/main.py", line 880, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 3203, in read result = BaseModel.read(records, fields, load=load) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 248, in wrapper return new_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 3238, in read self._read_from_database(stored, inherited) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 248, in wrapper return new_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 3429, in _read_from_database res2 = self._columns[f].get(cr, self._model, ids, f, user, context=context, values=result) File "/usr/lib/python2.7/dist-packages/openerp/osv/fields.py", line 802, in get records = comodel.search(domain, limit=self._limit) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 248, in wrapper return new_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 490, in new_api result = method(self._model, cr, uid, *args, **old_kwargs) File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 1668, in search return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4786, in _search self._apply_ir_rules(cr, user, query, 'read', context=context) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4611, 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 "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_rule.py", line 139, in domain_get query = self.pool[model_name]._where_calc(cr, SUPERUSER_ID, dom, active_test=False) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4556, in _where_calc e = expression.expression(cr, user, domain, self, context) File "/usr/lib/python2.7/dist-packages/openerp/osv/expression.py", line 644, in __init__ self.parse(cr, uid, context=context) File "/usr/lib/python2.7/dist-packages/openerp/osv/expression.py", line 844, in parse raise ValueError("Invalid field %r in leaf %r" % (left, str(leaf)))ValueError: Invalid field 'user_id' in leaf "<osv.ExtendedLeaf: ('user_id', '=', 10) on mail_followers (ctx: )>"