Odoo Help

Welcome!

This community 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.

0

AttributeError: 'NoneType' object has no attribute 'id'

By
Alcaline
on 1/29/15, 8:48 PM 1,470 views

Server Traceback (most recent call last): File "/opt/openerp/server-7/openerp/addons/web/session.py", line 90, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/opt/openerp/server-7/openerp/netsvc.py", line 293, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp/server-7/openerp/service/web_services.py", line 626, in dispatch res = fn(db, uid, *params) File "/opt/openerp/server-7/openerp/osv/osv.py", line 188, in execute_kw return self.execute(db, uid, obj, method, *args, **kw or {}) File "/opt/openerp/server-7/openerp/osv/osv.py", line 131, in wrapper return f(self, dbname, *args, **kwargs) File "/opt/openerp/server-7/openerp/osv/osv.py", line 197, in execute res = self.execute_cr(cr, uid, obj, method, *args, **kw) File "/opt/openerp/server-7/openerp/addons/audittrail/audittrail.py", line 514, in execute_cr return fct_src(cr, uid, model, method, *args, **kw) File "/opt/openerp/server-7/openerp/osv/osv.py", line 185, in execute_cr return getattr(object, method)(cr, uid, *args, **kw) File "/opt/openerp/server-7/openerp/addons/mail/mail_thread.py", line 242, in create thread_id = super(mail_thread, self).create(cr, uid, values, context=context) File "/opt/openerp/server-7/openerp/osv/orm.py", line 4487, in create self.check_access_rule(cr, user, [id_new], 'create', context=context) File "/opt/openerp/server-7/openerp/osv/orm.py", line 3905, in check_access_rule where_clause, where_params, tables = self.pool.get('ir.rule').domain_get(cr, uid, self._name, operation, context=context) File "/opt/openerp/server-7/openerp/addons/base/ir/ir_rule.py", line 150, in domain_get dom = self._compute_domain(cr, uid, model_name, mode) File "/opt/openerp/server-7/openerp/tools/cache.py", line 18, in lookup r = self.lookup(self2, cr, *args) File "/opt/openerp/server-7/openerp/tools/cache.py", line 46, in lookup value = d[key] = self.method(self2, cr, *args) File "/opt/openerp/server-7/openerp/addons/base/ir/ir_rule.py", line 130, in _compute_domain rule_domain = self.read(cr, uid, rule.id, ['domain'])['domain'] File "/opt/openerp/server-7/openerp/osv/orm.py", line 3604, in read result = self._read_flat(cr, user, select, fields, context, load) File "/opt/openerp/server-7/openerp/osv/orm.py", line 3724, in _read_flat res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res) File "/opt/openerp/server-7/openerp/osv/fields.py", line 1131, in get result = self._fnct(obj, cr, uid, ids, name, self._arg, context) File "/opt/openerp/server-7/openerp/addons/base/ir/ir_rule.py", line 53, in _domain_force_get res[rule.id] = expression.normalize_domain(eval(rule.domain_force, eval_context)) File "/opt/openerp/server-7/openerp/tools/safe_eval.py", line 241, in safe_eval return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict) File "", line 1, in <module> AttributeError: 'NoneType' object has no attribute 'id'

 

How can I solve this? any help please.. thanks

Did you inherited any module? If yes, is the name of the model is correctly spelled?. Did you added any new model and spelled it wrongly any where? Check these.

Emipro Technologies Pvt. Ltd.
on 1/29/15, 11:58 PM

please mention your code too,, that gives more clarity...

Baiju
on 1/30/15, 1:04 AM

The error indicates that there is some error with a record rule. Possible for 'create' and for mode 'mail.thread'. You might want to check what record rules are there.

Ivan
on 1/30/15, 12:16 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 1/29/15, 8:48 PM
Seen: 1470 times
Last updated: 3/16/15, 8:10 AM