1. 26 Dec, 2019 8 commits
    • Jérome Perrin's avatar
      Fix broken tests after !1011 · 74f09af3
      Jérome Perrin authored
      Fix broken tests after !1011 it was merged too fast.
      
      /reviewed-on !1018
      74f09af3
    • Jérome Perrin's avatar
      xhtml_style: don't allow google translate · 72a2977a
      Jérome Perrin authored
      Some users have been using google chrome builtin translation system with
      ERP5 back office (xhtml style), but the way google translation changes
      the DOM sometimes break ERP5 interface.
      This also have data privacy issue as this translation is done on google
      servers.
      
      https://www.w3.org/International/questions/qa-translate-flag recommends
      using translate=no but the approach of the meta tag might be preferable
      for our case as it prevents sending the page content to translation
      service.
      
      /reviewed-on nexedi/erp5!879
      72a2977a
    • Jérome Perrin's avatar
      monaco_editor: fixup broken commit · 7847b5db
      Jérome Perrin authored
      3d3ee5da had syntax error and test were
      not updated for new behavior
      7847b5db
    • Jérome Perrin's avatar
      ERP5: fix content_type property · 5d5e0c49
      Jérome Perrin authored
      content_type is a bit special, because CMF's PortalFolderBase also have
      a content_type method, so this was confusing ERP5Type dynamic properties
      system. When the property was never set, the default value was the
      method acquired from PortalFolderBase.
      
      Fixes this by defining conten_type class attribute where needed.
      
      This also fixes an old expected failure test, it's now possible to use
      edit(content_type=something) in document without content type property
      set. It works now, but thanks to what seems to be outdated code in
      _valid_property_id from product/ERP5Type/patches/PropertyManager.py,
      because we have stopped setting all properties to None in Base years
      ago. For now, this works, but because of an outdated condition in
      _valid_property_id. We may revisit later in the future.
      5d5e0c49
    • Vincent Pelletier's avatar
      EPR5Type.CopySupport: Only delete activities for deleted document which can be safely deleted. · 820d2fd1
      Vincent Pelletier authored
      Safe activities are:
      - those which are not visible outside current transaction (IOW, queued
        in activity buffer)
      - those which are already marked as failed, as no activity node will try
        to process these
      Other activities may already be running.
      Note: deleting even failed activities may violate activity dependencies
      (other activities may be waiting on the ones being deleted, even those
      not spawned yet), but if this is an issue then some other code should
      take care of these as well.
      Also, rework a CMFActivity test checking that activties already-spawned on
      a later-deleted context get discarded instead of being executed: previous
      implementation was working around the activity deletion removed in this commit.
      Also, test indexation/unindexation parallelism.
      820d2fd1
    • Vincent Pelletier's avatar
      CMFActivity.ActivityTool: Use uid for identity check instead of oid. · 06aee0c2
      Vincent Pelletier authored
      uids are a way one can signal that different objects (from a ZODB point of
      view, and hence an oid point of view) are actually to be considered as the
      same objet (from a higher abstration point of view). For example, another
      variant of the same object, as imported over an older variant.
      In turn, this allows extending the protection to activities spawned from
      brains, and not just from live objects.
      06aee0c2
    • Nicolas Wavrant's avatar
      erp5_forge: pre-fill changelog field · 4c981a55
      Nicolas Wavrant authored
      To save a bit of time every day (and save us from typos)
      4c981a55
    • Nicolas Wavrant's avatar
      erp5_core: business template's export action should be default choice · e58b50cc
      Nicolas Wavrant authored
      As now ERP5 is mainly used though the web interface, the use of the save action is nowadays very limited
      e58b50cc
  2. 25 Dec, 2019 12 commits
  3. 24 Dec, 2019 6 commits
    • Roque's avatar
    • Roque's avatar
    • Roque's avatar
      project_management: fix names and ids in domains · 2fbff7df
      Roque authored
      2fbff7df
    • Roque's avatar
    • Jérome Perrin's avatar
      web: update web section modification date in post-upgrade · a3560639
      Jérome Perrin authored
      Web sections or web sites displaying a default page should have
      modification date after the modification date of their default page, so
      that the "if-modified-since" requests can be replied with a 304 not
      modified responses.
      a3560639
    • Jérome Perrin's avatar
      upgrader: fix error when deduplicating constraints · 3bfa563b
      Jérome Perrin authored
      Upgrader detects that if some type have constraints and their container
      type also have constraint, it's not needed to check again this type
      because since checkConsistency is recursive when the container is
      checked they will also be checked.
      This fails when we have situtations like:
      
        X is allowed in Y
        X is allowed in Z
      
      and there are constraints for by X, Y and Z.
      This was raising a KeyError when pop'ing Z :
      
          Module script, line 50, in Base_getConstraintTypeListPerPortalType
           - <PythonScript at /erp5/Base_getConstraintTypeListPerPortalType used for /erp5/portal_alarms/upgrader_check_pre_upgrade>
           - Line 50
            type_list = constraint_type_per_type.pop(allowed_content_type)
          Module AccessControl.ZopeGuards, line 104, in guarded_pop
            v = guarded_getitem(d, key)
          Module AccessControl.ZopeGuards, line 83, in guarded_getitem
            v = object[index]
        KeyError: 'Z'
      
      In fact, this code is wrong, because if Z is also allowed in W and W
      does not have constraint, then Zs inside Ws will not be migrated. In
      practice, that's probably OK for now, because we don't use migration
      constraints on documents so much, most of the time we only do one
      script that checks the constraint globally.
      3bfa563b
  4. 23 Dec, 2019 1 commit
  5. 20 Dec, 2019 9 commits
  6. 19 Dec, 2019 4 commits