1. 14 Aug, 2018 6 commits
    • Jérome Perrin's avatar
      CMFCategory: do not store self membership of categories · e0e16129
      Jérome Perrin authored
      CategoryTool.getCategoryList dynamically returns categories as member of
      themselves, but there were cases (for example after changing id) where
      the membership happens to be saved in `categories` attribute and later
      caused problems after clones or renames.
      To prevent these problems, CategoryTool._setCategoryList detects the
      membership to self and does not save it as part of .categories
      
      Remove no longer needed after clone script.
      
      Remove tests which no longer makes sense now that setCategoryList does
      not add membership to self.
      e0e16129
    • Jérome Perrin's avatar
      testCMFCategory: update comment about categories membership to self · b6f82d25
      Jérome Perrin authored
      Add a warning about the doubt regarding the example in comment, to me
      this does not depend on category being member of self.
      
      One reason for the membership to self - in my understanding - is to make
      inventory API work the same with movement to meta node categories or
      movement to nodes member of this category when using
      getInventory(node_category=(the meta node category))
      
      Also remove comment about what's said to be a "mistake" ( the svn url should
      be equivalent to git commit eedb2b29 )
      because this was never reverted and does not seem to be a mistake, the
      purpose of the change is to prevent having categories member of
      themselves twice.
      b6f82d25
    • Jérome Perrin's avatar
      testCMFCategory: test category membership to itself after move · 85ab10de
      Jérome Perrin authored
      This was partially convered by test_13b_RenameCategoryUsingCutAndPaste
      and test_13_RenameCategory but not for the edge case where category
      membership to self is set in .categories
      85ab10de
    • Jérome Perrin's avatar
      testCMFCategory: test/document a bit more cases of update of related categories · 8fd819ba
      Jérome Perrin authored
      Add a few assertions and comment to make it clearer what is the expected
      behavior on related documents and on the category itself when categories
      are renamed or moved.
      8fd819ba
    • Jérome Perrin's avatar
    • Jérome Perrin's avatar
      Constraints on currencies instead of required fields · b7cc8ef9
      Jérome Perrin authored
      We have this [Do Not Test Required In Field View Form](https://www.erp5.com/documentation/developer/guideline/module/erp5-Guideline.Module.Creation#do-not-test-required-in-field-view-form rule) rule:
      > This kind of constraint should be defined in Constraints documents and should to be checked in workflow transitions.
      >
      > Checking a field as "required" can cause problems like not saving the data when the user clicks on the save button. The same applies to the use of External Validators scripts in fields.
      
      Currency view was not respecting this, there was both required fields and external validator. 
      Also, the external validator was using an incorrect way of getting the "context document", so it was not working on RenderJS UI.
      
      We are removing required fields and validator here, because this should be implemented using constraints instead.  To somehow preserve the same behavior, a new constraint is added in `erp5_base` and enabled in `erp5_configurator_standard`. Custom projects probably want to enable this constraint, but (as far as I know) we don't enable constraint by default. 
      
      This  `Base_uniqueReferenceInFolderValidator` was apparently not used anywhere else and not working anymore, so we are just removing it.
      
      
      /reviewed-on nexedi/erp5!710
      b7cc8ef9
  2. 13 Aug, 2018 1 commit
  3. 10 Aug, 2018 5 commits
  4. 09 Aug, 2018 3 commits
  5. 08 Aug, 2018 5 commits
  6. 07 Aug, 2018 2 commits
  7. 06 Aug, 2018 1 commit
  8. 03 Aug, 2018 6 commits
  9. 02 Aug, 2018 1 commit
  10. 01 Aug, 2018 2 commits
  11. 31 Jul, 2018 8 commits