Odoo Help


"'bool' object has no attribute 'replace'" Error when viewing Company info/settings

on 8/7/14, 9:01 AM 2,585 views

I am testing Odoo v8 on Ubuntu 14.04 and after some testing, I can no longer edit the company info. I get the following error:

Traceback (most recent call last): File "/opt/odoo/odoo-server/openerp/http.py", line 476, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/odoo/odoo-server/openerp/http.py", line 495, in dispatch result = self._call_function(**self.params) File "/opt/odoo/odoo-server/openerp/http.py", line 311, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/http.py", line 308, in checked_call return self.endpoint(*a, **kw) File "/opt/odoo/odoo-server/openerp/http.py", line 685, in __call__ return self.method(*args, **kw) File "/opt/odoo/odoo-server/openerp/http.py", line 360, in response_wrap response = f(*args, **kw) File "/opt/odoo/odoo-server/addons/web/controllers/main.py", line 983, in call_kw return self._call_kw(model, method, args, kwargs) File "/opt/odoo/odoo-server/addons/web/controllers/main.py", line 966, in _call_kw records = getattr(request.session.model(model), method)(*args, **kwargs) File "/opt/odoo/odoo-server/openerp/http.py", line 787, in proxy result = meth(cr, request.uid, *args, **kw) File "/opt/odoo/odoo-server/openerp/api.py", line 204, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/models.py", line 3106, in read result = BaseModel.read(records, fields, load=load) File "/opt/odoo/odoo-server/openerp/api.py", line 202, in wrapper return new_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/models.py", line 3095, in read values[name] = field.convert_to_read(record[name], use_name_get) File "/opt/odoo/odoo-server/openerp/fields.py", line 1324, in convert_to_read return value.sudo().name_get()[0] File "/opt/odoo/odoo-server/openerp/api.py", line 202, in wrapper return new_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/api.py", line 519, in new_api result = method(self._model, cr, uid, self.ids, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/addons/base/res/res_partner.py", line 600, in name_get name = name.replace('\n\n','\n') AttributeError: 'bool' object has no attribute 'replace'

Does anybody have a clue?



Ludo - Neobis

--Ludo - Neobis--
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--


Ludo - Neobis
On 8/7/14, 9:43 AM

Have you renamed your company outside of OpenERP, for example directly on the database?

Of did you perhaps delete the partner (in the res.partner table) that was automatically created with the company? 

On 8/7/14, 10:18 AM

I have never edited the file, or the record. The problem started when I added an event (in event management). I could delete the event and continue, although adding another event would give the same error. After that I deinstalled the event management app. Perhaps that me have caused the problem with the company records?

Could very well be. If you have access to the database using Postgres, I would recommend querying the company (select id,name from res_company) and/or the partner (select id,name from res_partner order by id desc) to check if both are still in there and have their respective names.

Ludo - Neobis
on 8/7/14, 11:04 AM

Ben Bernard

--Ben Bernard--

| 4 3 6
Jakarta, Indonesia
--Ben Bernard--
Ben Bernard
On 8/7/14, 10:15 AM

Interesting. The error is because variable name is bool object. It should be string. Did you ever edit res_partner.py before line 600 in name_get method? If you never edit the file, it could be a bug.

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: 8/7/14, 9:01 AM
Seen: 2585 times
Last updated: 3/16/15, 8:10 AM