Skip to content
Snippets Groups Projects
  1. Jan 30, 2025
    • Jo Sama's avatar
      Add order_id to salesorders · 5cbc8aea
      Jo Sama authored
      This is the identifier (salesordernumber) that is assigned when the
      salesorder is received. In many cases, this is what we'll need to
      transfer instead of the final salesorder number, which is produced days
      or weeks later when the salesorder is finally sent.
      5cbc8aea
  2. Jun 03, 2024
  3. Nov 02, 2023
  4. May 05, 2023
  5. Apr 24, 2023
  6. Mar 08, 2023
  7. Jan 03, 2023
    • Jo Sama's avatar
      Revise error handling when posting salesorders · 0362a688
      Jo Sama authored
      The raising of exceptions when posting batches results in the
      Unknown-status never beeing returned from the API. Aditionally, it
      exposes transport specifics out of the client module. One should only do
      one of them, not both. Exception raising when posting sales orders is
      now removed.
      v4.0.0
      0362a688
  8. Nov 28, 2022
  9. Jul 28, 2022
  10. Mar 11, 2022
  11. Feb 21, 2022
  12. Jan 14, 2022
  13. Nov 25, 2021
  14. Nov 10, 2021
    • Jo Sama's avatar
      Use correct JSON decode exception · 9a9a126c
      Jo Sama authored
      requests.exceptions.JSONDecodeError is non existent in requests versions
      before 3.0.0. Therefore requests is pinned to 2.24 or greater, and we
      use ValueError instead of requests.exceptions.JSONDecodeError.
      9a9a126c
  15. Oct 13, 2021
  16. Sep 21, 2021
    • Jo Sama's avatar
      Rework the put_update_batch() interface · a6c780f2
      Jo Sama authored
      This commit makes the interface of put_update_batch() quit similar to
      post_new_batch().
      a6c780f2
    • Jo Sama's avatar
      Don't send null values when updating batch · adcdadb7
      Jo Sama authored
      The Setra API does not accept null values for attributes, but it accepts
      that the attribute is omitted. We should probably accept null values
      for fields in order to avoid obscure bugs like this, but it does not
      hurt to omit the values.
      
      At least we use less of the bandwidth! :)
      adcdadb7
  17. Sep 07, 2021
  18. Aug 16, 2021
    • Jo Sama's avatar
      Post new batches without sending None-fields · 0cb5981e
      Jo Sama authored
      Exclude unset values from beeing transfered when posting a new batch to
      Setra. Setra does not accept fields set to None (at least period and
      vouchertype).
      0cb5981e
    • Jo Sama's avatar
      Redefine the interface for post_new_batch() · d97431cc
      Jo Sama authored
      This interface avoids leaking transport-specific information, while
      returning an indication of how the request fared so the user can decide
      on how to proceed with processing.
      d97431cc
  19. Jul 13, 2021
  20. May 27, 2021
    • Jo Sama's avatar
      Make BatchProgressEnum inherit from str · 651ac402
      Jo Sama authored
      This allows more readable code, as we can do
      
        if batch.batch_progress == BatchProgressEnum.VALIDATION_FAILED:
      
      instead of
      
        if batch.batch_progress == str(BatchProgressEnum.VALIDATION_FAILED):
      
      or
      
        if batch.batch_progress == BatchProgressEnum.VALIDATION_FAILED.value:
      651ac402
    • Jo Sama's avatar
      Make period optional for InputBatch · 57e32e0b
      Jo Sama authored
      Validation rule 12 defines period as an optional field. If empty, it
      will be populated by master data.
      57e32e0b
  21. May 07, 2021
    • Andreas Ellewsen's avatar
      Refactor models and methods for batches · d987abc4
      Andreas Ellewsen authored
      Instead of mixing the Batch model for batches sent *to* with batches
      received *from* SETRA, we switch to using an InputBatch and an
      OutputBatch. The InputBatch contains the fields that can be used when
      sending a Batch (with Vouchers and Transactions), and the OutputBatch
      contains all the information one receives from SETRA when fetching a
      single batch from the batch/ endpoint, or multiple using the search
      functionality.
      
      The get_batch method is reduced to only fetch a single batch, while the
      new search_batches method takes the role of searching based on creation
      date and interface. In addition, the return_list_of_obj parameter is
      removed in favor of the return_objects class attribute.
      
      This commit expects that SETRA includes the id field in Batches.
      d987abc4
  22. Apr 28, 2021
  23. Apr 27, 2021
  24. Apr 26, 2021
  25. Apr 23, 2021
  26. Mar 30, 2021
  27. Mar 29, 2021
  28. Mar 22, 2021
  29. Mar 15, 2021
Loading