Skip to content
Snippets Groups Projects
  1. Nov 02, 2023
  2. Apr 24, 2023
  3. Mar 08, 2023
  4. Nov 28, 2022
  5. Mar 11, 2022
  6. Jan 14, 2022
  7. Nov 25, 2021
  8. Oct 13, 2021
  9. Sep 07, 2021
  10. Jul 13, 2021
  11. 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
  12. 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
  13. Apr 28, 2021
  14. Mar 30, 2021
  15. Mar 29, 2021
  16. Mar 22, 2021
  17. Mar 15, 2021
  18. Mar 08, 2021
  19. Mar 04, 2021
    • Andreas Ellewsen's avatar
      Fix dateformats · 28d57f63
      Andreas Ellewsen authored
      Setra expects datetime.datetime, not datetime.date
      In addition, voucherdate is in fact not optional.
      28d57f63
  20. Feb 26, 2021
    • Andreas Ellewsen's avatar
      Add models and get_batch_errors method · cf89b7fc
      Andreas Ellewsen authored
      - Both get_batch_errors and get_batch_complete now return objects
        unless the client parameter return_objects is set to False
      - Tests for models, endpoints and client methods are included.
      cf89b7fc
    • Andreas Ellewsen's avatar
      Make Batch.period optional · 104b5ed7
      Andreas Ellewsen authored
      Validation rule 12 on Batches in SETRA sets the default value before
      transfer to Unit4ERP(UBW) if it is not set. The attribute is thus not
      required.
      104b5ed7
  21. Feb 25, 2021
  22. Feb 24, 2021
  23. Feb 19, 2021
  24. Feb 12, 2021
    • Andreas Ellewsen's avatar
      Make vouchertype optional · 0ad16be8
      Andreas Ellewsen authored
      There are validation rules in SETRA that sets this value to a default
      value set in the parameters table of SETRA. For this to be possible
      we must allow users to leave out the value.
      0ad16be8
  25. Feb 04, 2021
  26. Jan 28, 2021
  27. Jan 08, 2021
  28. Oct 29, 2020
  29. Sep 28, 2020
  30. Sep 25, 2020
  31. Aug 21, 2020
    • Andreas Ellewsen's avatar
      Add client, models and tests · b8d88940
      Andreas Ellewsen authored
      Introduces SetraClient. The client is made
      for use against the SETRA(SEntralt TRAnsaksjonslager) API.
      
      There are models for Batch, Voucher, Transaction and Multi, where Multi is
      a combination of the preceding, The Multi model validates that the batchid
      of the voucher matches the batch included, and that the voucherid of the
      transactions matches one of the included vouchers.
      
      Tests have also been included for the client itself, the endpoints, and
      the models.
      
      Configuration for tox, Jenkins and gitlab-ci are included for running
      tests and building the client.
      b8d88940
Loading