Odoo Help

2

OpenERP Server Error

By
FILLOMATIC GLOBAL INDUSTRIES (THAILAND) CO., LTD
on 1/15/14, 1:05 PM 2,365 views

Everytime I sign in to OpenERP, I always receive "OpenERP Server Error" message and all the transaction like purchase orders are gone (only in my account but still exist in other accounts). What have I done wrong? How can I fix this problem?

OpenERP Server Error Traceback (most recent call last): File "/home/odoo/src/web/saas-2/addons/web/http.py", line 325, in dispatch response["result"] = self._call_function(*self.params) File "/home/odoo/src/web/saas-2/addons/web/http.py", line 174, in _call_function return self.func(args, *kwargs) File "/home/odoo/src/web/saas-2/addons/web/http.py", line 1060, in nfunc return checked_call(request.db, *args, *kwargs) File "/home/odoo/src/server/saas-2/openerp/service/model.py", line 111, in wrapper return f(dbname, args, *kwargs) File "/home/odoo/src/web/saas-2/addons/web/http.py", line 1052, in checked_call return func(a, *kw) File "/home/odoo/src/web/saas-2/addons/web/controllers/main.py", line 1096, in call_kw return self._call_kw(model, method, args, kwargs) File "/home/odoo/src/web/saas-2/addons/web/controllers/main.py", line 1088, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, args, *kwargs) File "/home/odoo/src/addons/saas-2/mail/mail_message.py", line 591, in message_read message_id_list.insert(0, self._message_read_dict(cr, uid, message_tree[key], context=context)) File "/home/odoo/src/addons/saas-2/mail/mail_message.py", line 421, in _message_read_dict 'to_read': message.to_read, File "/home/odoo/src/server/saas-2/openerp/osv/orm.py", line 500, in __getattr__ return self[name] File "/home/odoo/src/server/saas-2/openerp/osv/orm.py", line 408, in __getitem__ field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write") File "/home/odoo/src/addons/saas-2/mail/mail_message.py", line 859, in read res = super(mail_message, self).read(cr, uid, ids, fields=fields, context=context, load=load) File "/home/odoo/src/server/saas-2/openerp/osv/orm.py", line 3673, in read result = self._read_flat(cr, user, select, fields, context, load) File "/home/odoo/src/server/saas-2/openerp/osv/orm.py", line 3789, in _read_flat res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res) File "/home/odoo/src/server/saas-2/openerp/osv/fields.py", line 1173, in get result = self._fnct(obj, cr, uid, ids, name, self._arg, context) File "/home/odoo/src/addons/saas-2/mail/mail_message.py", line 109, in _get_to_read ], context=context) File "/home/odoo/src/server/saas-2/openerp/osv/orm.py", line 2378, in search return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count) File "/home/odoo/src/server/saas-2/openerp/osv/orm.py", line 4949, in _search self._apply_ir_rules(cr, user, query, 'read', context=context) File "/home/odoo/src/server/saas-2/openerp/osv/orm.py", line 4829, 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/odoo/src/server/saas-2/openerp/addons/base/ir/ir_rule.py", line 156, in domain_get query = self.pool[model_name]._where_calc(cr, SUPERUSER_ID, dom, active_test=False) File "/home/odoo/src/server/saas-2/openerp/osv/orm.py", line 4774, in _where_calc e = expression.expression(cr, user, domain, self, context) File "/home/odoo/src/server/saas-2/openerp/osv/expression.py", line 641, in __init__ self.parse(cr, uid, context=context) File "/home/odoo/src/server/saas-2/openerp/osv/expression.py", line 840, in parse right_ids = relational_model.search(cr, uid, [(field_path[1], operator, right)], context=context) File "/home/odoo/src/addons/saas-2/base_calendar/crm_meeting.py", line 138, in search return super(mail_message, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count) File "/home/odoo/src/server/saas-2/openerp/osv/orm.py", line 2378, in search return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count) File "/home/odoo/src/addons/saas-2/portal/mail_message.py", line 38, in _search context=context, count=False, access_rights_uid=access_rights_uid) File "/home/odoo/src/addons/saas-2/mail/mail_message.py", line 642, in _search context=context, count=count, access_rights_uid=access_rights_uid) File "/home/odoo/src/server/saas-2/openerp/osv/orm.py", line 4948, in _search query = self._where_calc(cr, user, args, context=context) File "/home/odoo/src/server/saas-2/openerp/osv/orm.py", line 4774, in _where_calc e = expression.expression(cr, user, domain, self, context) File "/home/odoo/src/server/saas-2/openerp/osv/expression.py", line 641, in __init__ self.parse(cr, uid, context=context) File "/home/odoo/src/server/saas-2/openerp/osv/expression.py", line 805, in parse raise ValueError("Invalid field %r in leaf %r" % (left, str(leaf))) ValueError: Invalid field 'state' in leaf "<osv.extendedleaf: ('state',="" 'in',="" ['draft',="" 'sent',="" 'cancel',="" 'confirmed'])="" on="" mail_message="" (ctx:="" )>"<="" p="">

1
Atul Kumar jain
On 3/4/14, 7:55 AM

run the cmd through terminal

python openerp-server -u all -d <database_name>

hop it will solve your problem

and also create the username in database as your system user name

0
Rick Leir
On 3/4/14, 7:21 AM

This is not an answer, but hopefully it will help.

We have a different version, saas 7.n, but maybe this part of the code is the same. In mail_message.py, _search(), lines 615 to 618:

 # Rules do not apply to administrator
 if uid == SUPERUSER_ID:
    return super(mail_message, self)._search(cr, uid, args, offset=offset, limit=limit, order=order,
           context=context, count=count, access_rights_uid=access_rights_uid)

So is it a good guess that you are administrator? It looks as if _search is returning a list of message id's, and if you are not administrator then you get a filtered list (but what is filtered out?). The unfiltered list might contain a message that is in the wrong state. I would add to the question 'what is getting filtered out, and why?'

We are getting a similar traceback,

 2014-02-28 19:00:46,281 22819 ERROR new openerp.netsvc: Invalid field 'state' in leaf "<osv.ExtendedLeaf?: ('state', 'not in', ['draft', 'sent', 'cancel']) on mail_message (ctx: )>"
 Traceback (most recent call last):
    File "/root/saas/server/openerp/netsvc.py", line 236, in dispatch_rpc
        result = dispatch(method, params)
    File "/root/saas/server/openerp/service/model.py", line 36, in dispatch
        res = fn(db, uid, *params)
    File "/root/saas/server/openerp/service/model.py", line 160, in execute_kw
        return execute(db, uid, obj, method, *args, **kw or {})
    File "/root/saas/server/openerp/service/model.py", line 111, in wrapper
        return f(dbname, *args, **kwargs)
    File "/root/saas/server/openerp/service/model.py", line 170, in execute
        res = execute_cr(cr, uid, obj, method, *args, **kw)
    File "/root/saas/server/openerp/service/model.py", line 157, in execute_cr
        return getattr(object, method)(cr, uid, *args, **kw)
    File "/root/saas/addons/mail/mail_message.py", line 562, in message_read
        parent_tree[tree_parent_id].append(self._message_read_dict(cr, uid, message_tree[message_id], parent_id=tree_parent_id, context=context))
    File "/root/saas/addons/mail/mail_message.py", line 397, in _message_read_dict
        'to_read': message.to_read,
    File "/root/saas/server/openerp/osv/orm.py", line 483, in getattr
        return self[name]
    File "/root/saas/server/openerp/osv/orm.py", line 398, in getitem
        field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write")
    File "/root/saas/addons/mail/mail_message.py", line 785, in read
        res = super(mail_message, self).read(cr, uid, ids, fields=fields, context=context, load=load)
    File "/root/saas/server/openerp/osv/orm.py", line 3610, in read
        result = self._read_flat(cr, user, select, fields, context, load)
    File "/root/saas/server/openerp/osv/orm.py", line 3725, in _read_flat
        res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
    File "/root/saas/server/openerp/osv/fields.py", line 1134, in get
        result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
    File "/root/saas/addons/mail/mail_message.py", line 93, in _get_to_read
        ], context=context)
    File "/root/saas/server/openerp/osv/orm.py", line 2355, in search
        return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
    File "/root/saas/server/openerp/osv/orm.py", line 4875, in _search
        self._apply_ir_rules(cr, user, query, 'read', context=context)
    File "/root/saas/server/openerp/osv/orm.py", line 4755, 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 "/root/saas/server/openerp/addons/base/ir/ir_rule.py", line 156, in domain_get
        query = self.pool[model_name]._where_calc(cr, SUPERUSER_ID, dom, active_test=False)
    File "/root/saas/server/openerp/osv/orm.py", line 4703, in _where_calc
        e = expression.expression(cr, user, domain, self, context)
    File "/root/saas/server/openerp/osv/expression.py", line 641, in init
        self.parse(cr, uid, context=context)
    File "/root/saas/server/openerp/osv/expression.py", line 840, in parse
        right_ids = relational_model.search(cr, uid, [(field_path[1], operator, right)], context=context)
    File "/root/saas/addons/base_calendar/crm_meeting.py", line 134, in search
        return super(mail_message, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)
    File "/root/saas/server/openerp/osv/orm.py", line 2355, in search
        return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
    File "/root/saas/addons/portal/mail_message.py", line 41, in _search
        context=context, count=False, access_rights_uid=access_rights_uid)
    File "/root/saas/addons/mail/mail_message.py", line 618, in _search
        context=context, count=count, access_rights_uid=access_rights_uid)
    File "/root/saas/server/openerp/osv/orm.py", line 4874, in _search
        query = self._where_calc(cr, user, args, context=context)
    File "/root/saas/server/openerp/osv/orm.py", line 4703, in _where_calc
        e = expression.expression(cr, user, domain, self, context)
    File "/root/saas/server/openerp/osv/expression.py", line 641, in init
        self.parse(cr, uid, context=context)
    File "/root/saas/server/openerp/osv/expression.py", line 805, in parse
        raise ValueError?("Invalid field %r in leaf %r" % (left, str(leaf)))
 ValueError?: Invalid field 'state' in leaf "<osv.ExtendedLeaf?: ('state', 'not in', ['draft', 'sent', 'cancel']) on mail_message (ctx: )>"

When you post traceback or source you can use 'preformatted text' (see the icon with 1's and 0's?)

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 1/15/14, 1:05 PM
Seen: 2365 times
Last updated: 3/16/15, 8:10 AM