1. 28 Sep, 2017 6 commits
    • Ayush Tiwari's avatar
      erp5_catalog: Rename reindexObject method to use them as new methods for CatalogTool. · 7999a475
      Ayush Tiwari authored
      - This step is needed due to the use of BaseTool as Base class for CatalogTool
        due to which there were conflict between reindexObject from the Base and the one
        from the BaseTool.
      7999a475
    • Ayush Tiwari's avatar
      erp5_catalog: New ERP5CatalogTool based on BaseTool from ERP5Type · acf77006
      Ayush Tiwari authored
      	- Remove copy-pasting all code from CatalogTool, better to rely on inheritence
      	- Remove unnecessary imports
      	- Add argument id in __init__ class
      	- Add functions _isBootstrapRequired and _bootstrap
      	- Update BusinessTemplate installation according to changes made in ERP5Catalog and Tool
      	- Explicilty add manage option tabs in Catalog Tool
      
      - Update testCopySupport according to changes in portal_catalog
      
      Its better to change the tests where they need to call getpath function of
      portal_catalog to use portal_catalog.getpath instead of portal_catalog.getPath,
      as we have overridden the 'getPath' function for CatalogTool class due to change
      in inherited class.
      acf77006
    • Ayush Tiwari's avatar
      Products.ERP5Catalog: EPR5-ify catalog. · 2c44ec0c
      Ayush Tiwari authored
      Move from SQLCatalog to ERP5Catalog as the default Catalog inside ERP5.
      The major difference is use of Products.ERP5Type.Core.Folder as Catalog
      base class.
      
      Significant changes:
      	-Inherit from Catalog class from Products.ZSQLCatalog.SQLCatalog instead of copy-pasting the whole code again.
      	-Add allowed_types for ERP5Catalog tool
      	-Monkey patch some property setters and getters to maintain consistency
      	-Update id and title for ERP5Catlog while class initialization
      	-Set declarative securities and solve some inheritance conflicts
      	-Add isRADContent for ERP5Catalog Class
       	-Solve inheritence conflict for _setPropValue function in ERP5Catalog class
      	-Add SQL Method portal_type in allowed_types for ERP5Catalog class
      	-Override getCatalogMethodIds cause it uses global variable in SQLCatalog.Catalog
      	-Redefine security declarations
      	-Add functions for object_actions of Catalog portal_type in ERP5Catalog object
      	-Add filter_dict attribute for compatibilty
      
      Also,
      - Update BusinessTemplate installation with updated filter_dict
      This removes the need to copy-patch or if-else on meta_type of catalog.
      Use dynamic migration while installing the catalog method objects for
      bt5.
      - Update tests according to changes in portal_catalog
      - Create FilterDict and Filter class which would be used to imitate the behaviour
      of filter_dict for Catalog.
      2c44ec0c
    • Ayush Tiwari's avatar
      546d5ce2
    • Ayush Tiwari's avatar
      Products.ERP5.Document: Add SQLMethod class · 4a75862d
      Ayush Tiwari authored
      Create the SQLMethod class based on ZSQLMethods.SQL
      class and XMLObject. Also, move attributes to
      property in 'SQL Method' property sheets.
      4a75862d
    • Ayush Tiwari's avatar
      Products.ZSQLCatalog.SQLcatalog: Add function to get normal or deferred connection id for catalog · 7c486988
      Ayush Tiwari authored
      Also, we don't need to look for `transactionless` connection-id here, as we don't use them in
      catalog methods.
      
      And, update the files where we can use the new function.
      7c486988
  2. 27 Sep, 2017 10 commits
  3. 26 Sep, 2017 8 commits
  4. 25 Sep, 2017 4 commits
    • Vincent Bechu's avatar
      c2daeddf
    • Vincent Pelletier's avatar
      erp5_accounting: Remove table name from selected column aliases. · 3be8d312
      Vincent Pelletier authored
      This reverts commit 206fa603 (which was
      itself a revert commit), re-applying the change now that surrounding
      code is ready for it.
      3be8d312
    • Vincent Pelletier's avatar
      ZSQLCatalog: Also render ignored columns · e4aa5476
      Vincent Pelletier authored
      Ignored columns are produced when aliasing a column. For example,
      aliasing "catalog.reference" as "reference".
      Before this change, this would cause conditions on "reference" to be
      rendered non-mapped, which can cause SQL execution issues when there is
      more than one "reference" column available (catalog.reference and its
      alias counting as only one), which is the case when
      catalog-category-catalog joins happen.
      
      Instead, render all columns which could be mapped, independently from
      their "ignored" status.
      
      Also, use a different local variable for table aliases than for column
      aliases.
      Also, use more "return" statements, and simplify conditional structure.
      e4aa5476
    • Vincent Pelletier's avatar
      SimulationTool: Remove input/output perimeter definition. · 8b6865ae
      Vincent Pelletier authored
      As per Jérome, who implemented the test, it was written to test the
      current state rather than testing the desired outcome. And it makes
      little sense to have (and test for) 100 being present in both debit and
      credit columns ("normal" lines), and 0 to be present in the stat line.
      
      Update test to check for a more consistent outcome.
      Acked-by: Jérome Perrin's avatarJérome Perrin <jerome@nexedi.com>
      8b6865ae
  5. 22 Sep, 2017 12 commits