1. 05 Jan, 2025 1 commit
    • Jérome Perrin's avatar
      *: replace erp5_site_global_id by a mechanism in test framework · df383ea5
      Jérome Perrin authored
      erp5_site_global_id was from the tiolive time, when we were using ERP5
      with mariadb and memcached instances shared by many zope instances, this
      was used as a way to implement namespaces in memcached, to prevent
      conflicts such as two different zope using the same cache keys.
      
      Nowadays, we no longer share memcached, each ERP5 instance has its own
      memcached and this prefixing is no longer needed, but there is still one
      exception, when we run test using runTestSuite with --node_quantity
      higher than 1, we have multiple running test instances sharing the same
      mariadb and the same memcached. In that case, each test instance
      uses a different mariadb database, but the risk of conflict remain for
      memcached.
      
      To solve this, we use derive a prefix from mariadb connection string
      and use it in memcached.
      
      This was more or less what the current implementation was trying to do,
      but we were setting erp5_site_global_id on the wrong object, so it was
      not working since 4889d523 (Define property's default value at class
      level., 2012-12-31). Also, this was only done at the level of SharedDict,
      but some APIs such as CacheTool or SessionTool use MemcachedDict
      directly.
      
      Also, there was a problem that we did not notice yet, because the
      previous implementation was doing nothing: memcached keys are limited in
      size, to overcome this, we don't use the full connection string in
      base64 (which is around 70 characters), but a short hash of the
      connection string.
      df383ea5
  2. 25 Dec, 2024 1 commit
  3. 23 Dec, 2024 2 commits
    • Titouan Soulard's avatar
      erp5_core: fix `TypeError` on raise in `Base_edit` · a4274276
      Titouan Soulard authored
      String value raised with `ValueError` had an extra `%s` at the end, hence
      raising another error when formatting:
      
      > TypeError: not enough arguments for format string
      
      This commit simply removes the extra formatting character, since I could not
      guess what should have been printed here.
      a4274276
    • Titouan Soulard's avatar
      erp5_trade: fix method `Movement_zGetPackedQuantity` · 4aec00c2
      Titouan Soulard authored
      The ZSQLMethod was using a wrong table `movement` instead of the `stock` table,
      hence throwing errors. This commit makes it use the right table, by adding a
      filter on `node_uid`, taking into account the structure of the new table.
      
      /reviewed-by @jerome
      /reviewed-on nexedi/erp5!2030
      4aec00c2
  4. 19 Dec, 2024 2 commits
  5. 18 Dec, 2024 4 commits
  6. 17 Dec, 2024 1 commit
  7. 14 Dec, 2024 4 commits
  8. 13 Dec, 2024 7 commits
  9. 06 Dec, 2024 1 commit
  10. 21 Nov, 2024 1 commit
  11. 20 Nov, 2024 2 commits
  12. 18 Nov, 2024 2 commits
  13. 15 Nov, 2024 1 commit
  14. 14 Nov, 2024 1 commit
    • Nicolas Wavrant's avatar
      erp5_pdm: speed up the Stock view of products · d1c141da
      Nicolas Wavrant authored
      By pre-fetching some catalog entries to retrieve objects UIDs that can directly
      be used in the inventory query, to avoid needless (costly) joins and hinting
      the catalog to use the resource_section_node_uid index of the stock table.
      d1c141da
  15. 12 Nov, 2024 9 commits
  16. 11 Nov, 2024 1 commit