An error occurred fetching the project authors.
  1. 14 May, 2014 2 commits
    • Julien Muchembled's avatar
      Amount Generator: automatic sort based on application/contribution dependencies [2/2] · 73b325c5
      Julien Muchembled authored
      This implements dependency resolution to sort amount generator lines
      so that a base_amount is never contributed after it was applied.
      
      Before, it was required to sort manually using int_index or float_index, which
      can be difficult for a human when there are many lines spreaded over different
      containers (which are merged by composition). Another problematic case is when
      a set of lines is configured by a user (like discounts & fees) and must all be
      applied before other lines (taxes) that are installed elsewhere by the
      developer: how to reliably make sure the latter have index values that are
      already greater than those entered by the user ?
      
      Setting int_index or float_index is now only useful for lines:
      - with same reference: only the maching one with lowest index is taken
        into account (commit 68ec6bda)
      - applying to intermediate values of some base_amount
        (commit 10be013b)
      
      The difficult part to solve dependencies is that the calculation for a
      given base_amount may trigger the application of other base_amount, and so on
      recursively. In order to support this case, amount generator lines are first
      applied on a dummy amount, and getGeneratedAmountQuantity must be call
      unconditionally for all dependent base_amount. So optimizing like
      
        return 3 <= delivery_amount.getGeneratedAmountQuantity('base_amount/1') \
            or 1 <= delivery_amount.getGeneratedAmountQuantity('base_amount/2')
      
      is wrong except if 'base_amount/2' is only contributed by the movement or if
      you sort manually with indices.
      
      Dependency resolution has precedence over indices. But since the sort is stable,
      lines will remain sorted by index if it respects dependencies.
      73b325c5
    • Julien Muchembled's avatar
      Amount Generator: automatic sort based on application/contribution dependencies [1/2] · dd10a334
      Julien Muchembled authored
      Preliminary commit only to indent a big section of code.
      dd10a334
  2. 13 May, 2014 5 commits
  3. 10 Apr, 2014 2 commits
  4. 12 Dec, 2011 1 commit
  5. 25 Nov, 2011 1 commit
  6. 16 Nov, 2011 1 commit
  7. 15 Nov, 2011 1 commit
  8. 06 Sep, 2011 1 commit
  9. 31 Aug, 2011 1 commit
  10. 22 Feb, 2011 1 commit
  11. 26 Jan, 2011 3 commits
  12. 12 Jan, 2011 1 commit
  13. 07 Jan, 2011 1 commit
  14. 03 Nov, 2010 1 commit
  15. 25 Oct, 2010 1 commit
  16. 18 Oct, 2010 1 commit
  17. 15 Oct, 2010 2 commits
  18. 14 Oct, 2010 1 commit
  19. 13 Oct, 2010 2 commits
  20. 12 Oct, 2010 1 commit
  21. 11 Oct, 2010 1 commit
    • Julien Muchembled's avatar
      Review new amount generator · e2075796
      Julien Muchembled authored
      - Update API and interfaces
      - Make it possible to:
        - do non-linear calculation (via global type-based script)
          for every considered base_amount
          (i.e. not only for base_application of input movements).
          To avoid performance issue, the type-based script is changed to return
          functions instead of calculating results directly.
        - get accumulated values from movements while generating amounts for a
          delivery (i.e. for Amount Generator Lines targetting deliveries).
      - Produce amounts even if there is no resource, for reporting.
      - Drop probably useless create_line property: checking if there is a resource
        should be enough.
      - Prepare refactoring of MRP/Trade/Payroll by introducing AmountGeneratorLine
        class and property sheet.
      - Stop doing anything if there is no base_application on an AGL to avoid
        conflicts while figuring out if a movement was created manually or not.
      - Update some forms.
      - Update testTradeModelLine
      
      git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/amount_generator@39028 20353a03-c40f-0410-a6d1-a30d3c3de9de
      e2075796
  22. 20 Aug, 2010 1 commit
  23. 12 Aug, 2010 1 commit
  24. 06 Jul, 2010 1 commit
  25. 14 May, 2010 1 commit
  26. 27 Apr, 2010 1 commit
  27. 20 Apr, 2010 2 commits
  28. 19 Apr, 2010 2 commits