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

Error on Accounting AttributeError: 'Unknown attribute is_company in browse_record(res.partner, 30) '

By
angro
on 1/23/14, 9:03 AM 648 views

Hello.

I have an error while accessing Accounting. I receive this error on screen:

Client Traceback (most recent call last):
  File "/opt/openerp/v7/web/addons/web/http.py", line 204, in dispatch
    request._cr = None
  File "/opt/openerp/v7/web/addons/web/controllers/main.py", line 1054, in search_read
    }
  File "/opt/openerp/v7/web/addons/web/controllers/main.py", line 1089, in do_search_read
  File "/opt/openerp/v7/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 "/opt/openerp/v7/web/addons/web/session.py", line 30, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/opt/openerp/v7/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 "/opt/openerp/v7/web/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/opt/openerp/v7/server/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/v7/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/v7/server/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp/v7/server/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/v7/server/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/v7/server/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/v7/server/openerp/osv/orm.py", line 3620, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/opt/openerp/v7/server/openerp/osv/orm.py", line 3740, in _read_flat
    res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
  File "/opt/openerp/v7/server/openerp/osv/fields.py", line 1139, in get
    result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
  File "/opt/openerp/v7/server/openerp/osv/fields.py", line 1205, in _fnct_read
    value = value[field] or False
  File "/opt/openerp/v7/server/openerp/osv/orm.py", line 402, in __getitem__
    field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write")
  File "/opt/openerp/v7/server/openerp/osv/orm.py", line 3620, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/opt/openerp/v7/server/openerp/osv/orm.py", line 3740, in _read_flat
    res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
  File "/opt/openerp/v7/server/openerp/osv/fields.py", line 1139, in get
    result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
  File "/opt/openerp/v7/server/openerp/addons/base/res/res_partner.py", line 212, in <lambda>
    _commercial_partner_id = lambda self, *args, **kwargs: self._commercial_partner_compute(*args, **kwargs)
  File "/opt/openerp/v7/server/openerp/addons/base/res/res_partner.py", line 206, in _commercial_partner_compute
    while not current_partner.is_company and current_partner.parent_id:
  File "/opt/openerp/v7/server/openerp/osv/orm.py", line 496, in __getattr__
    raise AttributeError(e)
AttributeError: 'Unknown attribute is_company in browse_record(res.partner, 30) '

And if I go to log file, I see this:

2014-01-23 12:35:15,848 13879 ERROR mydbname openerp.osv.orm.browse_record.res.partner: Fields to fetch: ['comment', 'ean13', 'color', 'city', 'user_id', 'opt_out', 'title', 'company_id', 'last_reconciliation_date', 'employee', 'type', 'function', 'fax', 'phone', 'display_name', 'active', 'customer', 'name', 'debit_limit', 'signup_token', 'vat', 'state_id', 'use_parent_address', 'street', 'birthdate', 'signup_type', 'country_id', 'notification_email_send', 'parent_id', 'supplier', 'ref', 'email', 'is_company', 'website', 'vat_subjected', 'street2', 'section_id', 'date', 'tz', 'signup_expiration', 'lang', 'credit_limit', 'zip', 'mobile'], Field values: [{'comment': False, 'ean13': False, 'color': 0, 'use_parent_address': False, 'date': '2013-12-16', 'street': u'XXXXX', 'birthdate': False, 'signup_type': u'signup', 'supplier': False, 'id': 31, 'city': u'XXXXX', 'user_id': 7, 'opt_out': False, 'zip': u'XXXXX', 'title': 5, 'country_id': 69, 'company_id': 1, 'website': False, 'parent_id': False, 'notification_email_send': u'all', 'last_reconciliation_date': '2014-01-22 17:02:53', 'employee': False, 'type': u'contact', 'email': u'XXXX@XXXXXX', 'vat': False, 'tz': u'Europe/Madrid', 'function': u'XXXXXX', 'lang': u'es_ES', 'fax': u'XXXXXXX', 'vat_subjected': False, 'street2': u'XXXXXX', 'section_id': 1, 'phone': u'XXXXXX', 'credit_limit': 0.0, 'active': True, 'display_name': u'XXXXXX', 'signup_expiration': False, 'customer': True, 'ref': u'XXXXXX', 'name': u'XXXX', 'mobile': u'XXXXXX', 'debit_limit': 0.0, 'signup_token': u'XXXXXXXXXXXXXXXXX', 'is_company': False, 'state_id': 52}]
2014-01-23 12:35:15,848 13879 ERROR mydbname openerp.osv.orm.browse_record.res.partner: Cached: {'id': 30}, Table: <openerp.osv.orm.res.partner object at 0x7f58485e1710>

2014-01-23 12:35:15,848 13879 ERROR mydbname openerp.osv.osv: Uncaught exception
Traceback (most recent call last):
  File "/opt/openerp/v7/server/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/v7/server/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/v7/server/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/v7/server/openerp/osv/orm.py", line 3620, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/opt/openerp/v7/server/openerp/osv/orm.py", line 3740, in _read_flat
    res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
  File "/opt/openerp/v7/server/openerp/osv/fields.py", line 1139, in get
    result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
  File "/opt/openerp/v7/server/openerp/osv/fields.py", line 1205, in _fnct_read
    value = value[field] or False
  File "/opt/openerp/v7/server/openerp/osv/orm.py", line 402, in __getitem__
    field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write")
  File "/opt/openerp/v7/server/openerp/osv/orm.py", line 3620, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/opt/openerp/v7/server/openerp/osv/orm.py", line 3740, in _read_flat
    res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
  File "/opt/openerp/v7/server/openerp/osv/fields.py", line 1139, in get
    result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
  File "/opt/openerp/v7/server/openerp/addons/base/res/res_partner.py", line 212, in <lambda>
    _commercial_partner_id = lambda self, *args, **kwargs: self._commercial_partner_compute(*args, **kwargs)
  File "/opt/openerp/v7/server/openerp/addons/base/res/res_partner.py", line 206, in _commercial_partner_compute
    while not current_partner.is_company and current_partner.parent_id:
  File "/opt/openerp/v7/server/openerp/osv/orm.py", line 496, in __getattr__
    raise AttributeError(e)
AttributeError: 'Unknown attribute is_company in browse_record(res.partner, 30) '
2014-01-23 12:35:15,849 13879 ERROR mydbname openerp.netsvc: Unknown attribute is_company in browse_record(res.partner, 30)

The Xs are to protect some data. The original log shows real data.

I see is_company field there, so I don't know why I receive that error.

I'm not python programmer, so I cannot fix by my own.

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

0 follower(s)

Stats

Asked: 1/23/14, 9:03 AM
Seen: 648 times
Last updated: 3/16/15, 8:10 AM