1. 21 Jan, 2022 15 commits
  2. 20 Jan, 2022 1 commit
  3. 18 Jan, 2022 1 commit
    • Jérome Perrin's avatar
      dms: rename print actions not to conflict with erp5_odt_style · ea4debfe
      Jérome Perrin authored
      odt_style comes with "Print" global actions which allows getting the
      default form as ODT and convert it to selected format and DMS comes with
      "Print" actions which return a PDF of the document content.
      
      As a result, when user try to use Print, they have the same action twice
      with no way to know which one is which.
      
      This is detected by CodingStyleTestCase.test_DuplicateActions, but only
      for configurations where both erp5_odt_style and erp5_dms are installed,
      which is not the case in coding style test suite which only install the
      miminmal dependent business templates.
      ea4debfe
  4. 17 Jan, 2022 3 commits
  5. 14 Jan, 2022 6 commits
    • Jérome Perrin's avatar
      Workflow: don't change REQUEST when passing transition · 91af570a
      Jérome Perrin authored
      The new workflow implementation from df85ef46 (ERP5Workflow: DC Workflows
      are now ERP5 objects (!1378)., 2020-11-18) had a different behavior in
      the implementation of _executeTransition, it was setting all kwargs
      from the transition in REQUEST. The reasons for this are unclear, it
      seem to come from the first Workflow implementation, 81784db4 (Initial
      Import of ERP5Workflow porduct., 2010-10-15)
      
      The side effects are that calling a workflow method, for example:
      
        document.edit(key=value)
      
      would also alter the global request to set key=value in REQUEST, for the
      rest of the current request.
      
      It was causing subtle issues, especially in tests where the REQUEST
      lifetime is long.
      91af570a
    • Jérome Perrin's avatar
      workflow: fix Update Security Roles action on workflow · 55049a0c
      Jérome Perrin authored
      This was redirecting with the full list of updated documents URLs,
      causing too long URLs.
      
      This also simplifies code a bit, change the wording of messages and
      use translation.
      55049a0c
    • Yusei Tahara's avatar
      b092cb06
    • Jérome Perrin's avatar
      ERP5Type: make TempBase use TemporaryDocumentMixin · 86951172
      Jérome Perrin authored
      Now that TemporaryDocumentMixin and TempBase implementation details have
      been made consistent, there's no reason to duplicate code.
      
      This also make TempBase uses TemporaryDocumentMixin of __setstate__, so
      TempBase have more sane behaviour when being pickled.
      86951172
    • Jérome Perrin's avatar
      ERP5Type: Normalize the implementations of TemporaryDocumentMixin and TempBase · b2e03135
      Jérome Perrin authored
      Products.ERP5Type.mixin.temporary.TemporaryDocumentMixin and
      Products.ERP5Type.Base.TempBase implementations were a bit different:
      
       - getTitle was acquiring title in TemporaryDocumentMixin, although this
       was probably never acquiring in practice because most documents have
       a title.
       - isIndexable was an int and not a PropertyConstantGetter like it is
       supposed to be.
      
      Change TemporaryDocumentMixin to behave like TempBase here.
      
      =
      b2e03135
    • Jérome Perrin's avatar
      core: support storing collections of ERP5 documents in session · 490a56ba
      Jérome Perrin authored
      Before f359f267 (Use Distributed Cache for Session, 2021-07-19)
      when we were using RAM cache for sessions, it was possible to store
      collections (eg. dicts or lists) with reference to ERP5 documents in
      session, but after this change, using such collections was refused
      with error:
      
          TypeError: Can't pickle objects in acquisition wrappers.
      
      This change restore the possibility of using collections, by being
      more clever when we store and retrieve collections
      490a56ba
  6. 13 Jan, 2022 9 commits
  7. 12 Jan, 2022 2 commits
  8. 11 Jan, 2022 1 commit
  9. 07 Jan, 2022 2 commits
    • Xiaowu Zhang's avatar
      3249ff62
    • Vincent Pelletier's avatar
      Revert "Products.CMFActivity.ActivityTool: Improve behaviour on single-node instances." · 340acac6
      Vincent Pelletier authored
      Also revert related fixup commits:
        "CMFActivity: fixup do not loop on tic if the node is the distribution node"
        "Products.ERP5Type.tests: Follow-up on ActivityTool.tic signature change."
      
      While the original commit did improve the specific workload it was
      designed to improve, it turned out to degrade too much intensive activity
      workloads, like initial ERP5 site creation and tests (which, for the
      purposes of this change, are the same as a single-zope instance).
      Given how easy it is to get a multi-Zope instance, which would solve the
      original issue and also provide the better performance necessary anyway
      for an instance managing a non-trivial amount of documents, I choose to
      revert this change.
      
      I am not reverting several loosely-related changes I applied, which
      rather fix real bugs uncovered by the different activity execution
      scheme this change provided, especially by letting tests'
      "stop_condition" callback being executed a lot more often between
      activities, uncovering missing dependencies and unrealistic test
      expectations, whose fixes should be beneficial independently from the
      reverted code.
      
      This reverts commit 4dfafbc9.
      This reverts commit 4eb26017.
      This reverts commit 041642d0.
      340acac6