1. 26 Jul, 2018 5 commits
    • Sebastien Robin's avatar
      ERP5Type.Base: do not look for related objects on temp objects · 0c2c3a88
      Sebastien Robin authored
      Doing get[CategoryName]RelatedValueList or similar accessors on temp
      objects makes the category tool raising errors since last code
      refactoring. Since the concept of temp object is specific to ERP5, just
      make sure in ERP5 low level code that we do not try to call category
      tool on temp object for getting related object.
      0c2c3a88
    • Sebastien Robin's avatar
      CopySupport: _duplicate should not call manage_afterPaste · 4e444654
      Sebastien Robin authored
      Since last factorisation of code, _duplicate started to call manager_afterPaste
      while this was not done before. Thus it prevented the possibility to duplicate
      objects with preserved workflow history.
      
      Add test to check _duplicate
      4e444654
    • Sebastien Robin's avatar
      CMFCategory: getRelatedValueList should return documents matching any category · 05fbafcf
      Sebastien Robin authored
      portal_categories.getRelatedValueList(my_document,
      base_category_list=["category_1", "category_2"]) should return any document
      related through category_1 or through category_2.
      
      Before this fix, only documents having this in categories match :
      category_1/path_to/my_document
      category_2/path_to/my_document
      
      There was clearly a regression, since script Organisation_jumpToRelatedObjectList
      was working fine for years (it pass many base_category to getRelatedValueList), and
      it was not working any more.
      05fbafcf
    • Sebastien Robin's avatar
      trade: allow using value 0 for the quantity in fast inputs · 7a3f71d8
      Sebastien Robin authored
      0 is a valid value. So instead of showing by default 0.0 for all quantities and forcing users to set
      something different than 0, now by default the quantity is empty, and user is forced to something
      something different from empty.
      7a3f71d8
    • Sebastien Robin's avatar
      InventoryLine: like any other delivery line, use default quantity getter · 5d7e6a06
      Sebastien Robin authored
      This remove 12 years old compatibility code looking if some values where stored
      in property "inventory".
      
      This makes inventory line supporting default value, like getQuantity(1)
      5d7e6a06
  2. 25 Jul, 2018 2 commits
  3. 24 Jul, 2018 1 commit
  4. 19 Jul, 2018 1 commit
  5. 17 Jul, 2018 3 commits
  6. 13 Jul, 2018 1 commit
  7. 12 Jul, 2018 2 commits
  8. 11 Jul, 2018 2 commits
  9. 09 Jul, 2018 1 commit
  10. 06 Jul, 2018 1 commit
  11. 05 Jul, 2018 13 commits
  12. 04 Jul, 2018 3 commits
    • Vincent Pelletier's avatar
      CMFActivity: Get rid of an outdated comment. · bc65ba72
      Vincent Pelletier authored
      The original need to touch this comment is that it mentions now-removed
      Folder_reindexObjectList script. But also:
      - it mentions multi-ZEO setups, which are now discouraged if favour of
        using NEO
      - it mentions pre-conceived optimisations, which can be wrong and hence
        misleading (up-to-date measures are needed before deciding what to
        optimise)
      - it mentions a number of activity nodes which is nowadays exceeded
        without seeing any obvious issue caused by activity table deadlocks
        (which are nevertheless still likely an issue, just not yet breaking
        scalability)
      bc65ba72
    • Vincent Pelletier's avatar
      all: Get rid of Folder_reindex{All,Objectlist,TreeObjectList} · e944e1ef
      Vincent Pelletier authored
      These are now superseded by recursiveReindexObject.
      e944e1ef
    • Vincent Pelletier's avatar
      all: Remove recursiveImmediateReindexObject, and references to it. · c0b284be
      Vincent Pelletier authored
      This method does not belong to Folder (nor Base, even as an alias), as
      it recurses wihout any limit in a tree whose node count is unknown.
      Such generic recursion should either be deferred (split in multiple
      transactions, each processing a limited chunk of the tree) or not be
      recursive (which of course depends on the need).
      There is a single caller left (constructInstance) where the subtree size
      is assumed to be reasonable, as it was constructed inside current
      transaction. So essentially rename this method so it is only used in such
      conditions.
      c0b284be
  13. 03 Jul, 2018 5 commits
    • Vincent Pelletier's avatar
      Base: Add isSubtreeIndexable and isAncestryIndexable · 5c4c69a0
      Vincent Pelletier authored
      isAncestryIndexable is a parent-recursive version of isIndexable: it
      will return False if any parent is non-indeable. This simplifies
      disabling indexation of an entire tree, from its root to its deepest
      leaves.
      isSubtreeIndexable allows preventing any subobject from being indexable,
      without having to mark each individual subobject as non-indexable. This
      is different from isAncestryIndexable, as it allows having an indexable
      root, but no children indexable. This is especially useful for Trash Bins,
      where the bin itself should be indexable (because there is no reason not to)
      but its content must not be indexed, while being left as it was found in its
      original location.
      5c4c69a0
    • Vincent Pelletier's avatar
      Folder: Make recursiveReindexObject scalable by calling _recurseCallMethod. · babbf56f
      Vincent Pelletier authored
      Should make Folder_reindexAll and most custom indexation methods obsolete.
      Remaining valid reindexation methods are:
      - reindexObject: for a single document, which may contain subdocuments
        which indexation is not necessary
      - recursiveReindexobject: for any subtree of documents
      - ERP5Site_reindexAll: for site-wide reindexations, as there is a semantic-
        dependent indexation order.
      
      Also, uniformise and factorise spawning immediateReindexObject.
      
      Also:
      - testSupply: Drop check for the previous magic threshold.
        _recurseCallMethod takes care of it all now.
      - testXMLMatrix: Let activities execute before changing cell id.
        This works only because recursiveReindexObject on the matrix spawns a
        single recursiveImmediateReindexObject activity on that context. Now,
        up to 1k immediateReindexObject activities (for the first 1k sub-objects)
        are spawned immediately, preventing their renaming immediately after
        commit.
        So let test wait for indexation before trying to rename.
      - testERP5Security: More activities are now spawned immediately, adapt.
      babbf56f
    • Vincent Pelletier's avatar
      all: Replace after_path_and_method_id on reindexation methods by after_tag · 028c9ad7
      Vincent Pelletier authored
      after_method_id is too aggressive a dependency.
      after_path_and_method_id is marginally better, but is bad practice
      nevertheless, as such activity dependencies remain very hard to introspect.
      Tags allow more variations, and are hence easier to follow.
      Also, add XXX comments when (recursive) reindexation is only added to
      represent the dependency, without certainty that a reindexation is actually
      needed per-se: maybe another place in the code chould just appropriately
      tag its reindexation activities instead, saving at least the cost of
      spawning one more activity set, and at most the cost of actually
      reindexing these documents.
      028c9ad7
    • Vincent Pelletier's avatar
      ERP5Site: Do reindex the whole site after creation. · 9d9e4bbc
      Vincent Pelletier authored
      Also, drop isIndexable instance property, unmasking class property, which
      already has the value we need.
      Also, factorise catalog clearing by reusing ERP5Site_reindexAll's.
      9d9e4bbc
    • Vincent Pelletier's avatar
      CategoryTool: Become a BaseTool subclass. · 4b25512d
      Vincent Pelletier authored
      Allows having a more consistent API between this tool and all other
      Nexedi-maintained tools.
      4b25512d