1. 27 Nov, 2019 2 commits
    • Vincent Pelletier's avatar
      erp5_mysql_innodb_catalog: Replace translation join into a separate query. · d89a10a0
      Vincent Pelletier authored
      Translation table seems to be often picked before other conditions by
      MariaDB's query planner.
      When there is at least one other condition on a query which require a
      join (ex: category-based relation, delivery-table-based date
      comparison, ...) this may not be the most efficient execution plan.
      Instead, put translation lookup into its own separate query, in a way
      similar to security_uid lookup. This way, two separate execution plans
      can be used to execute the overall operation.
      One drawback is that the new query does not know of any portal_type
      condition, so all possible original values are listed along with their
      respective portal types.
      This does not seem to affect query performance, and on most common
      (and simple) cases where a translated value is used, like module
      listboxes, the query planner should be able to eliminate irrelevant
      entries as such queries are already expected to provide a list of
      relevant portal types and to lack condition nesting.
      Preserve custom related keys: these are used when selecting or sorting,
      while the scriptable keys are used when applying a condition.
      Note on UI tests: mass workflow transition listbox is not supposed to be
      sorted. It's bad that these tests all rely on row order, and also bad
      that they all check the whole listbox. They should pick the line they
      care about and not check the rest - except for one test whose purpose
      would be to check the whole list anyway.
      d89a10a0
    • Vincent Pelletier's avatar
      ZSQLCatalog.SQLCatalog: Expand scriptable keys further. · 4059e29e
      Vincent Pelletier authored
      Add support for "like" auto-detection and use as default comparison
      operator.
      Allows mimicking KeywordKey and DefaultKey with 2 parameters, in addition
      to already-supported simple SearchKey.
      4059e29e
  2. 26 Nov, 2019 3 commits
  3. 25 Nov, 2019 5 commits
  4. 22 Nov, 2019 12 commits
  5. 21 Nov, 2019 4 commits
  6. 19 Nov, 2019 1 commit
    • Jérome Perrin's avatar
      Test Suite for Coding Style test · 82206749
      Jérome Perrin authored
      A new test suite to perform static check on business templates using  `CodingStyleTestCase`.
      
      This runs a coding style test for each business template, after installing the business template and its dependencies listed in business template metadata.
      
      ---
      
      In order to start with a test suite with no failure, business templates that does not pass this test today (because they don't install or because pylint issues still needs to be reviewed) are skipped with an ad-hoc  `bt/skip_coding_style_test` in the business template. Note that this file is not created by business template system as it is a temporary measure, business templates must pass pylint and other checks from `CodingStyleTestCase`.
      
      ---
      
      I took the approach of creating one independent test per business template, instead of the approach of creating a site with all business templates like we did in testNamingConventions or testHTML. This appears as another "Coding Style" test, like Performance or Scalability tests.
      
      The idea behind this was that if we extend our business template checks ( for example when we translate the [ERP5 Module Creation Guidelines](https://www.erp5.com/documentation/developer/guideline/module) to some scripts we can run on a business template ), we can check that each business template contain what it should contain and not just that the global result is OK.
      
      
      
      /reviewed-on nexedi/erp5!629
      82206749
  7. 18 Nov, 2019 5 commits
  8. 15 Nov, 2019 2 commits
  9. 14 Nov, 2019 6 commits