Skip to content
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

time_entry_ids missing / incompatible #276

Open
roydejong opened this issue Jan 19, 2023 · 1 comment
Open

time_entry_ids missing / incompatible #276

roydejong opened this issue Jan 19, 2023 · 1 comment

Comments

@roydejong
Copy link
Contributor

API Docs reference: sales_invoice[details_attributes][time_entry_ids]

This field allows the user to pass an array of time registration IDs. This links the registrations to the invoice line and updates their status to invoiced.

Currently, this field is missing from SalesInvoiceDetail / InvoiceDetail, but there's a bigger issue at play:

Because the JSON_FORCE_OBJECT option is used when generating JSON payloads, it is currently impossible to serialize a raw array into a request payload, it will always be converted to an object. It seems that the current design of this library simply does not support array fields.

Some kind of solution would be appreciated, although there probably is no easy solution here without serious structural changes.

@arwinvdv
Copy link

arwinvdv commented Jan 23, 2024

Same problem here for LedgerAccount.allowed_document_types. It's not possible to create a LedgerAccount. I only get the error below because allowed_document_types is an object instead of array.

Error 400: {"error":"Allowed Document Types isn't an array","symbolic":{"ledger_account":{"allowed_document_types":"array"}}}" 

Is there a quick fix? Otherwise I'll see if I can make a pull request.

Edit:
I created a temporary fix 1329e92

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

No branches or pull requests

2 participants