1. 14 Jan, 2022 2 commits
    • 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
    • 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
  2. 06 Jan, 2022 2 commits
    • Jérome Perrin's avatar
      zopewsgi: start TimerServer from startup script · 9fc3cf28
      Jérome Perrin authored
      When running with ZServer, TimerServer will be started by ZConfig
      machinery, because ZServer comes with some ZConfig data types for server
      factory which start servers.
      
      One Zope 2, ZServer was imported from zopeschema:
      
      https://github.com/zopefoundation/Zope/blob/2.13.30/src/Zope2/Startup/zopeschema.xml#L10
      
      and ZConfig used the TimerServerFactory to create a TimerService.
      
      On Zope 4, ZServer is not imported anymore in the new wsgischema:
      
      https://github.com/zopefoundation/Zope/blob/4.6.3/src/Zope2/Startup/wsgischema.xml
      
      so the ZConfig data type can not be used to create the server.
      
      Instead of relying on ZServer's ZConfig, we create the server directly
      from the startup script, the logic to attach to waitress is already here
      and startup and factory just called create, so the only difference is
      that we no longer use zope.conf to configure TimerService, but configure
      from the script.
      
      SlapOS profile also needs to be modified in order to not include ZConfig
      bits for timerserver and to pass the timerserver interval in the wrapper
      to this script.
      9fc3cf28
    • Vincent Pelletier's avatar
      erp5_core: Make Preference_disableOtherPreferences consistent. · 520ff509
      Vincent Pelletier authored
      Ownership and Owner role are distinct: catalog's "viewable_owner" is
      role-based, but "owner" is ownership based. As permissions are applied by
      catalog in addition to any given parameter, this should not change the
      result of this query. And as any owner which does not have the Owner role
      would cause this script to fail on the assertion, this should not change
      the result of this script in any way besides avoiding AssertionErrors.
      520ff509
  3. 03 Jan, 2022 1 commit
  4. 28 Dec, 2021 1 commit
    • Jérome Perrin's avatar
      core: introduce Base_addEditWorkflowComment helper script · e71090b9
      Jérome Perrin authored
      This is intended to replace portal_workflow.doActionFor with edit_action,
      which was only available for users with modify portal content permission
      on the document and also is a bit low level.
      
      It is a common, especially in project specific code that we use
      edit_action to leave notes in history and provide better traceability
      and we sometimes do this on documents where user does not have the
      modify portal content permission.
      e71090b9
  5. 22 Dec, 2021 1 commit
  6. 14 Dec, 2021 1 commit
  7. 30 Nov, 2021 1 commit
    • Cédric Le Ninivin's avatar
      Introduce OpenId Connect · 9c4d0edd
      Cédric Le Ninivin authored
      erp5_openid_connect_client_login: Add dedicated cache factory to work with open id connect
      
      erp5_openid_connect_client_login: Add Scope, Client Metadata and state
      
      * Add configurable scope to connector
      * Client Metadata is a JSON defined on connector
      * Add state parameter to make redirect non repeatable
      
      erp5_openid_connect_client_login: Update OpenId Connect to be be fully functionnal
      
      erp5_openid_connect_client_login: Add tests and some minor fixup
      
      erp5_openid_connect_client_login: Don't call create user on each call to callback
      
      erp5_openid_connect_client_login: Test create connector in portal web services
      
      erp5_openid_connect_client_login: Fix test on open Id connector creation in afterSetUp
      
      OpenIDConnect: Add Extraction Plugin
      
      openidconnect: Have functionnal Extractor
      
      erp5_core: Add Case of OpenId Connect Client
      
      erp5_xhtml_style: Add OpenId Connect to Login Form
      
      erp5_web: Add OpenId Connect Logout
      
      erp5_web_renderjs_ui: Add OpenId Connect to Login Form and Logout
      
      erp5_credential: Add OpenId Connect to login form
      9c4d0edd
  8. 24 Nov, 2021 1 commit
  9. 17 Nov, 2021 1 commit
  10. 10 Nov, 2021 1 commit
  11. 09 Nov, 2021 2 commits
  12. 04 Nov, 2021 1 commit
  13. 22 Oct, 2021 1 commit
    • Jérome Perrin's avatar
      core: Extend Category import with an option to force deletion of categories in use · 78cf1c94
      Jérome Perrin authored
      Category spreadsheet import did not delete categories if some documents
      where related to these categories. While this may make sense when using
      this import in site with already some data, in many cases, we want to
      be able to delete the categories, so that the result is that the category
      tree match the imported spreadsheet.
      
      This extend the dialog to support a new "force delete" mode that delete
      categories even if they are use, leaving the documents using categories
      with broken relations.
      78cf1c94
  14. 18 Oct, 2021 1 commit
  15. 15 Oct, 2021 1 commit
  16. 14 Oct, 2021 1 commit
    • Julien Muchembled's avatar
      fixup! New portal type: External Method · fd4880ce
      Julien Muchembled authored
      This fixes commit ea53f23e:
      
        ERROR Application Couldn't install ERP5Type
        Traceback (most recent call last):
          File "OFS/Application.py", line 691, in install_product
            initmethod(context)
          File "Products/ERP5Type/__init__.py", line 141, in initialize
            initializeProductDocumentRegistry()
          File "Products/ERP5Type/InitGenerator.py", line 62, in initializeProductDocumentRegistry
            importLocalDocument(class_id, class_path=class_path)
          File "Products/ERP5Type/Utils.py", line 994, in importLocalDocument
            module = __import__(module_path, {}, {}, (module_path,))
          File "Products/ERP5/Document/ExternalMethod.py", line 38, in <module>
            class ExternalMethod(XMLObject, ZopeExternalMethod, ExpressionMixin):
        TypeError: Error when calling the metaclass bases
            metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
      
      What happened is that the API of ExpressionMixin changed in commit
      df85ef46 and the backward compatibility
      code (product/ERP5/mixin/expression.py) was broken.
      
      Also fix 'filter' tab on in the catalog.
      See also commit 6ad56d89.
      fd4880ce
  17. 12 Oct, 2021 1 commit
  18. 11 Oct, 2021 1 commit
  19. 07 Oct, 2021 1 commit
    • Jérome Perrin's avatar
      pdm: expose quantity unit in default supply · 7e54bbcb
      Jérome Perrin authored
      Quantity unit was not defined in default supply property sheet, so the
      fields were created local properties, because the accessors were not
      existant. This change make the accessors for quantity unit on default
      supply lines generated.
      
      The implementation details is that it replaces priced_quantity, which was
      defined twice
      7e54bbcb
  20. 20 Sep, 2021 1 commit
  21. 03 Sep, 2021 1 commit
  22. 19 Aug, 2021 1 commit
  23. 05 Aug, 2021 1 commit
  24. 29 Jul, 2021 1 commit
  25. 27 Jul, 2021 1 commit
    • Jérome Perrin's avatar
      core/mrp: make sure getAggregatedAmountList return amounts in order · 1c1ec0bc
      Jérome Perrin authored
      For some reports displaying transformations result to end users, it's much
      better to have amount ordered in the same order as the model lines.
      
      AmountGeneratorMixin was already sorting the lines, but the order was lost
      during aggregation, because we used a dict, which on python2 does not
      retain order. Switch to using an OrderedDict to keep the order.
      1c1ec0bc
  26. 26 Jul, 2021 1 commit
  27. 13 Jul, 2021 2 commits
  28. 06 Jul, 2021 1 commit
  29. 30 Jun, 2021 1 commit
  30. 25 Jun, 2021 3 commits
    • Jérome Perrin's avatar
      core: implement Session.update · bac5ff3f
      Jérome Perrin authored
      It was using the default UserDict.update implementation which did not remove
      acquisition wrapper and eventually lead to ConnectionStateError like for example
      
      > Shouldn't load state for erp5.portal_type.Interaction Workflow Interaction 0x6637 when the connection is closed
      
      which was observed when deleting sale order lines (wich triggers some interaction)
      bac5ff3f
    • Tristan Cavelier's avatar
      erp5_core: change erp5_session cache type to Distributed Ram Cache · f2d5b043
      Tristan Cavelier authored
      Previously `Ram Cache` was used, causing anonymous clients to never use portal_session properly.
      Mainly for public forum captcha purpose.
      Now `Distributed Ram Cache` is used to share the session between the zope nodes.
      It's required to restart all zope nodes after this BT5 upgrade.
      f2d5b043
    • Jérome Perrin's avatar
      SessionTool: support storing temp objects · 06be6573
      Jérome Perrin authored
      This was only supported for the RAMCache version of session tool, but is also
      good to support them in DistributedRamCache, so that we can use DistributedRamCache
      by default.
      
      One breaking change is that when using RAMCache, changes made to temp objects
      in session were persisting for the session lifetime, after this change, each
      time we get the object from the session we get a new fresh object, so if we
      make change we have to explicitly put it back to the session, which is surprising
      for developers used to the convenience of ZODB transparent persistence.
      06be6573
  31. 23 Jun, 2021 1 commit
  32. 11 Jun, 2021 1 commit
  33. 09 Jun, 2021 1 commit
    • Jérome Perrin's avatar
      core: keep using default_params from proxy listbox ids · afa5c0fc
      Jérome Perrin authored
      With bf57228a ([erp5_core] RelationField listbox must also fetch
      default_params value from the relationfield, 2018-05-09), we introduced a
      regression that listboxs from relation fields "proxy listbox ids" default params
      where no longer used. As a result, if we have a listbox which define some
      catalog search with default parameters, like for example the "Suppliers" or
      "Clients" listboxs from erp5_trade are doing, these parameters were not
      taken into account. In the case of trade listbox, this was showing all nodes.
      
      This changes Base_getRelatedObjectParameter to get catalog search from the
      proxy listbox if there is one.
      afa5c0fc
  34. 04 Jun, 2021 1 commit
    • Jérome Perrin's avatar
      xhtml_style: remove timestamp from ckeditor URLs · cde8c993
      Jérome Perrin authored
      This timestamp break officejs offline capabilities.
      
      This reaplies 40f6c8fe ([erp5_xhtml_style] ckeditor: drop hardcoded
      timestamp parameter in URL, 2017-10-16) on the updated CKEditor
      
      This was done with:
      
          find product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_ckeditor/ckeditor/ -type f  | xargs sed -i 's/"L4KA"/""/g'
      
      L4KA was the timestamp for this build, that we can in the top of ckeditor.js
      cde8c993