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

I can't import or add analytic accounts in odoo 9. While adding am getting an error

By
Neeraja Ragesh
on 10/25/16, 4:17 AM 130 views

Odoo Server Error
Traceback (most recent call last):
  File "/opt/odoo/openerp/http.py", line 643, in _handle_exception    return super(JsonRequest, self)._handle_exception(exception)  File "/opt/odoo/openerp/http.py", line 680, in dispatch    result = self._call_function(**self.params)  File "/opt/odoo/openerp/http.py", line 316, in _call_function    return checked_call(self.db, *args, **kwargs)  File "/opt/odoo/openerp/service/model.py", line 118, in wrapper    return f(dbname, *args, **kwargs)  File "/opt/odoo/openerp/http.py", line 309, in checked_call    result = self.endpoint(*a, **kw)  File "/opt/odoo/openerp/http.py", line 959, in __call__    return self.method(*args, **kw)  File "/opt/odoo/openerp/http.py", line 509, in response_wrap    response = f(*args, **kw)  File "/opt/odoo/addons/web/controllers/main.py", line 896, in call_kw    return self._call_kw(model, method, args, kwargs)  File "/opt/odoo/addons/web/controllers/main.py", line 888, in _call_kw    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)  File "/opt/odoo/openerp/api.py", line 250, in wrapper    return old_api(self, *args, **kwargs)  File "/opt/odoo/addons/project_issue/project_issue.py", line 540, in create    return super(project_project, self).create(cr, uid, vals, context=context)  File "/opt/odoo/openerp/api.py", line 250, in wrapper    return old_api(self, *args, **kwargs)  File "/opt/odoo/addons/project/project.py", line 319, in create    project_id = super(project, self).create(cr, uid, vals, context=create_context)  File "/opt/odoo/openerp/api.py", line 250, in wrapper    return old_api(self, *args, **kwargs)  File "/opt/odoo/openerp/api.py", line 354, in old_api    result = method(recs, *args, **kwargs)  File "/opt/odoo/addons/mail/models/mail_thread.py", line 232, in create    thread = super(MailThread, self).create(values)  File "/opt/odoo/openerp/api.py", line 248, in wrapper    return new_api(self, *args, **kwargs)  File "/opt/odoo/openerp/models.py", line 4151, in create    record = self.browse(self._create(old_vals))  File "/opt/odoo/openerp/api.py", line 248, in wrapper    return new_api(self, *args, **kwargs)  File "/opt/odoo/openerp/api.py", line 490, in new_api    result = method(self._model, cr, uid, *args, **old_kwargs)  File "/opt/odoo/openerp/models.py", line 4207, in _create    record_id = self.pool[table].create(cr, user, tocreate[table], context=context)  File "/opt/odoo/openerp/api.py", line 250, in wrapper    return old_api(self, *args, **kwargs)  File "/opt/odoo/addons/project/project.py", line 898, in create    analytic_account_id = super(account_analytic_account, self).create(cr, uid, vals, context=context)  File "/opt/odoo/openerp/api.py", line 250, in wrapper    return old_api(self, *args, **kwargs)  File "/opt/odoo/openerp/api.py", line 354, in old_api    result = method(recs, *args, **kwargs)  File "/opt/odoo/addons/mail/models/mail_thread.py", line 237, in create    thread.message_post(body=_('%s created') % doc_name)  File "/opt/odoo/openerp/api.py", line 248, in wrapper    return new_api(self, *args, **kwargs)  File "/opt/odoo/addons/mail/models/mail_thread.py", line 1734, in message_post    new_message = MailMessage.create(values)  File "/opt/odoo/openerp/api.py", line 248, in wrapper    return new_api(self, *args, **kwargs)  File "/opt/odoo/addons/mail/models/mail_message.py", line 868, in create    values['record_name'] = self._get_record_name(values)  File "/opt/odoo/openerp/api.py", line 248, in wrapper    return new_api(self, *args, **kwargs)  File "/opt/odoo/addons/mail/models/mail_message.py", line 831, in _get_record_name    return self.env[model].sudo().browse(res_id).name_get()[0][1]  File "/opt/odoo/openerp/api.py", line 248, in wrapper    return new_api(self, *args, **kwargs)  File "/opt/odoo/addons/analytic/models/analytic.py", line 74, in name_get    name = name +' - '+analytic.partner_id.commercial_partner_id.nameTypeError: coercing to Unicode: need string or buffer, bool found

How to reproduce this error?

Artem
on 10/30/16, 3:20 PM
0
Neeraja Ragesh
On 10/31/16, 8:54 AM

This error was due to the bug in customer field. While creating an analyic account or project if you didn't select customer, the error won't come up. You can also opt for adding customer after creating and then editing a project/analytic account.

If you are selecting customer while creating a project the error will be back. I just removed that customer field and created my own. Now the error has gone

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: 10/25/16, 4:17 AM
Seen: 130 times
Last updated: 10/31/16, 8:54 AM