1. 21 Apr, 2021 8 commits
    • Arnaud Fontaine's avatar
    • Arnaud Fontaine's avatar
      ERP5Workflow: Rename Portal Types. · 5aa717e5
      Arnaud Fontaine authored
      5aa717e5
    • Arnaud Fontaine's avatar
      ERP5Workflow: Remove unused variable_default_value... · 01b1f24c
      Arnaud Fontaine authored
      ERP5Workflow: Remove unused variable_default_value (variable_default_expression should be used instead).
      01b1f24c
    • Arnaud Fontaine's avatar
    • Arnaud Fontaine's avatar
      ERP5Workflow: Worklist is a Predicate. · dca0053b
      Arnaud Fontaine authored
      This commit is going to be squashed into:
        ERP5Workflow: DC Workflows are now ERP5 objects (!1378).
        ERP5Workflow: Migrate all DCWorkflows to ERP5 objects (!1378).
      
      Worklist filter objects based on given criterions and thus it makes more sense
      for a Worklist to be a Predicate (albeit a Predicate with only Identity Criterion
      and nothing else).
      
      Criterion Properties:
        * State Variable.
        * local_roles (SECURITY_PARAMETER_ID): No more ad-hoc check_roles parameter on checkGuard().
        * Any Workflow Variable with for_catalog == 1.
        * Introduce getIdentityCriterionDict()
      
      Also:
        * Remove "ad-hoc" matched* properties: This sounds like a premature optimization.
        * No need for Worklist Variable as these use "normal" Workflow Variables (where for_catalog == 1).
      dca0053b
    • Arnaud Fontaine's avatar
      ERP5Workflow: erp5_configurator_*: Migrate Configurator Workflows from... · 9b882ed5
      Arnaud Fontaine authored
      ERP5Workflow: erp5_configurator_*: Migrate Configurator Workflows from workflow_module to portal_workflow (!1378).
      9b882ed5
    • Arnaud Fontaine's avatar
      ERP5Workflow: DC Workflows are now ERP5 objects (!1378). · 70ac2c30
      Arnaud Fontaine authored
      This also moves all Configurator Workflows in workflow_module to portal_workflow
      (workflow_module was an implementation of Workflows based on ERP5 objects and
      not using DCWorkflow code).
      
      * Workflows are now defined on on portal_workflow._chains_by_type anymore but,
        as everything else, on the Portal Type itself.
      * portal_workflow can contain and work at the same time with legacy and new
        Workflows (ERP5Type/patches/DCWorkflow.py monkey-patching DCWorkflow classes
        to provide the same API).
      * Existing Workflow Scripts should work as they are and the code can be updated
        later on to take advantage of the new API:
        + With legacy implementation Workflow {Scripts,Transitions,Worklists,States}
          were in a Folder ({scripts,transitions,worklists,states} attribute) but
          all of these are now in the Workflow itself and their IDs are prefixed
          (PropertySheet-style), for example `script_`. Legacy attributes are
          provided in new implementation to call the new API.
        + When calling a Workflow Script, `container` was bound to its parent, namely
          WF.scripts (Folder) and a Workflow Script could call another. Now `container`
          is bound to the WF itself and Workflow Scripts are in a Workflow directly.
          New implementation `scripts` attribute handle such use case.
        + Override portal_workflow.__getattr__ so that a Workflow Script can call
          another one without prefix.
      
      erp5_performance_test:testWorkflowPerformance were ran to compare DCWorkflow
      and ERP5Workflow implementations and it seems to be about 4% slower with the
      new implementation (legacy: 7.547, 7.593, 7.618, 7.59, 7.514 and new: 7.842,
      7.723, 7.902, 7.837, 7.875).
      
      Work done by Wenjie Zheng, Isabelle Vallet, Sebastien Robin and myself.
      70ac2c30
    • Arnaud Fontaine's avatar
  2. 19 Apr, 2021 2 commits
  3. 16 Apr, 2021 1 commit
    • Jérome Perrin's avatar
      xhtml_style: fix rendering of standard_error_message when site title is not ASCII · 8fffd3f8
      Jérome Perrin authored
      When rendering error page, the default header_title is computed in global_definitions
      and this is done by concatenating string:ERP5 (which is unicode) and the
      title of the portal (which is an UTF-8 encoded string), which causes an
      UnicodeDecodeError, because the portal title was decoded as ASCII.
      
      Because header_title is usually an UTF-8 encoded string, also use an UTF-8
      encoded string for 'ERP5' default value.
      8fffd3f8
  4. 15 Apr, 2021 8 commits
  5. 14 Apr, 2021 9 commits
  6. 13 Apr, 2021 6 commits
  7. 12 Apr, 2021 3 commits
  8. 09 Apr, 2021 3 commits