Error, when clicking "pay" on posted invoice after using action "modify payee"

Hi,
I got this error today, when clicking button “pay invoice”. For that specific invoice I used the action “modify payee”, because the invoice adress was wrong after posting. Without using “modify payee” it works fine.

I can reproduce this error on version 7.0.7. on my server. On the demo server i was not able to get the button “pay invoice” on a posted invoice, even though I added a payment method.

Traceback (most recent call last):
  File "usrlocallibpython3.11dist-packagestrytondwsgi.py", line 109, in dispatch_request
    return endpoint(request, **request.view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "usrlocallibpython3.11dist-packagestrytondprotocolsdispatcher.py", line 43, in rpc
    return methods.get(request.rpc_method, _dispatch)(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "usrlocallibpython3.11dist-packagestrytondwsgi.py", line 75, in wrapper
    return func(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "usrlocallibpython3.11dist-packagestrytondprotocolswrappers.py", line 197, in wrapper
    return func(request, pool, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "usrlocallibpython3.11dist-packagestrytondprotocolsdispatcher.py", line 242, in _dispatch
    response = app.make_response(request, result)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "usrlocallibpython3.11dist-packagestrytondwsgi.py", line 132, in make_response
    response = cls.response(data, request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "usrlocallibpython3.11dist-packagestrytondprotocolsjsonrpc.py", line 191, in response
    return Response(json.dumps(
                    ^^^^^^^^^^^
  File "usrlibpython3.11json__init__.py", line 238, in dumps
    **kw).encode(obj)
          ^^^^^^^^^^^
  File "usrlibpython3.11jsonencoder.py", line 200, in encode
    chunks = self.iterencode(o, _one_shot=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "usrlibpython3.11jsonencoder.py", line 258, in iterencode
    return _iterencode(o, 0)
           ^^^^^^^^^^^^^^^^^
  File "usrlocallibpython3.11dist-packagestrytondprotocolsjsonrpc.py", line 68, in default
    return marshaller(obj)
           ^^^^^^^^^^^^^^^
  File "usrlibpython3.11jsonencoder.py", line 180, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type party.party is not JSON serializable

Regards Jakob

Hi, please file a bug.

Hi, i would like to, but this post was originaly “seen as spam” by heptapod. now my account is blocked. Who ca attend with the blocked account. I am supposed to contact my adminstrator. …

Regards Jakob

1 Like

I filed the bug, my account was reopened

1 Like

FYI here is Error when clicking pay Invoice Button after using the action "modify payee" and changing the party to pay (#13140) · Issues · Tryton / Tryton · GitLab

1 Like