odoo / odoo/docker

Odoo Server Error when klick "Create" on Contacts

Open
#330 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
1.2k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Fehler:
Odoo Server Error

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 682, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 358, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 346, in checked_call
    result = self.endpoint(*a, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 911, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 530, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1359, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1351, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 396, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 383, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 6146, in onchange
    value = record[name]
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 5621, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 972, in __get__
    self.compute_value(recs)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1111, in compute_value
    records._compute_field_value(self)
  File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 410, in _compute_field_value
    return super()._compute_field_value(field)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 4020, in _compute_field_value
    getattr(self, field.compute)()
  File "/mnt/extra-addons/de_helpdesk/models/res_partner.py", line 28, in _compute_helpdesk_ticket_count
    [("partner_id", "child_of", record.id)]
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 1697, in search
    res = self._search(args, offset=offset, limit=limit, order=order, count=count)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 4453, in _search
    query = self._where_calc(args)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 4209, in _where_calc
    return expression.expression(domain, self).query
  File "/usr/lib/python3/dist-packages/odoo/osv/expression.py", line 438, in __init__
    self.parse()
  File "/usr/lib/python3/dist-packages/odoo/osv/expression.py", line 830, in parse
    ids2 = to_ids(right, comodel, leaf)
  File "/usr/lib/python3/dist-packages/odoo/osv/expression.py", line 520, in to_ids
    return list(value)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 638, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 314, in _handle_exception
    raise exception.with_traceback(None) from new_cause
TypeError: 'NewId' object is not iterable

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at /mnt/extra-addons/de_helpdesk/models/res_partner.py line 28, then follow the Odoo onchange and _compute_helpdesk_ticket_count calls shown in the traceback. Reproduce clicking Create on Contacts and inspect the child_of search receiving a NewId. Done means identifying the cause and verifying that creating a contact no longer raises this TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.