Odoo Help


Errror when create quotation or convert to quotation "ValueError: Invalid leaf 1"

Ahmed elbarbary
on 1/27/15, 1:39 AM 1,511 views

i am using openerp v7 and there is an erro when sales persons try to create quotation or convert to quotation , and this error generate only for sales persons not sales manager, could any on help me ?


OpenERP Server Error

Client Traceback (most recent call last): File "/home/habib/openerp7/web/addons/web/http.py", line 204, in dispatch response["result"] = method(self, **self.params) File "/home/habib/openerp7/web/addons/web/controllers/main.py", line 1128, in call_kw return self._call_kw(req, model, method, args, kwargs) File "/home/habib/openerp7/web/addons/web/controllers/main.py", line 1114, in _call_kw records = req.session.model(model).read(*args, **kwargs) File "/home/habib/openerp7/web/addons/web/session.py", line 42, in proxy result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw) File "/home/habib/openerp7/web/addons/web/session.py", line 30, in proxy_method result = self.session.send(self.service_name, method, *args) File "/home/habib/openerp7/web/addons/web/session.py", line 103, in send raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info) Server Traceback (most recent call last): File "/home/habib/openerp7/web/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/home/habib/openerp7/server/openerp/netsvc.py", line 289, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/home/habib/openerp7/server/openerp/service/web_services.py", line 614, in dispatch res = fn(db, uid, *params) File "/home/habib/openerp7/server/openerp/osv/osv.py", line 169, in execute_kw return self.execute(db, uid, obj, method, *args, **kw or {}) File "/home/habib/openerp7/server/openerp/osv/osv.py", line 123, in wrapper return f(self, dbname, *args, **kwargs) File "/home/habib/openerp7/server/openerp/osv/osv.py", line 179, in execute res = self.execute_cr(cr, uid, obj, method, *args, **kw) File "/home/habib/openerp7/server/openerp/osv/osv.py", line 166, in execute_cr return getattr(OBJECT, method)(cr, uid, *args, **kw) File "/home/habib/openerp7/server/openerp/osv/orm.py", line 3606, in read result = self._read_flat(cr, user, select, fields, context, load) File "/home/habib/openerp7/server/openerp/osv/orm.py", line 3726, in _read_flat res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res) File "/home/habib/openerp7/server/openerp/osv/fields.py", line 536, in get ids2 = obj.pool.get(self._obj).search(cr, user, domain + [(self._fields_id, 'in', ids)], limit=self._limit, context=context) File "/home/habib/openerp7/server/openerp/osv/orm.py", line 2356, in search return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count) File "/home/habib/openerp7/server/openerp/osv/orm.py", line 4846, in _search self._apply_ir_rules(cr, user, query, 'read', context=context) File "/home/habib/openerp7/server/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/habib/openerp7/server/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/habib/openerp7/server/openerp/osv/orm.py", line 4676, in _where_calc e = expression.expression(cr, user, domain, self, context) File "/home/habib/openerp7/server/openerp/osv/expression.py", line 632, in __init__ self.parse(cr, uid, context=context) File "/home/habib/openerp7/server/openerp/osv/expression.py", line 742, in parse self.stack = [ExtendedLeaf(leaf, self.root_model) for leaf in self.expression] File "/home/habib/openerp7/server/openerp/osv/expression.py", line 527, in __init__ self.check_leaf() File "/home/habib/openerp7/server/openerp/osv/expression.py", line 583, in check_leaf raise ValueError("Invalid leaf %s" % str(self.leaf)) ValueError: Invalid leaf 1

Ahmed elbarbary
On 3/1/15, 6:37 AM

i found the solution it was related to access rules the domain was : (1,'=',1)

but it must be : [(1,'=',1)]

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.


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

1 follower(s)


Asked: 1/27/15, 1:39 AM
Seen: 1511 times
Last updated: 3/16/15, 8:10 AM