Skip to content

Fixed Transaction.GetInvoiceFromTxn to convert to the right type of Python object #2074

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

featherfeet
Copy link
Contributor

GetInvoiceFromTxn method for Transaction objects in the Python bindings binds to a C function that returns a GncInvoice*, but it was attempting to return a Transaction, which causes errors. Fixed it to return a Python Invoice object.

Copy link
Member

@jralls jralls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also needs a unit test.

@featherfeet featherfeet force-pushed the fix-get-invoice-from-transaction-python branch from 9d5475b to 479ecc7 Compare April 16, 2025 17:28
@featherfeet
Copy link
Contributor Author

@jralls , sorry for the delay. I believe the last "self" argument is not needed. I have added a Python unit test that shows the fixed binding works.

@code-gnucash-org code-gnucash-org merged commit e81d284 into Gnucash:stable Apr 26, 2025
@jralls
Copy link
Member

jralls commented Apr 26, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants