1. 28 Nov, 2019 35 commits
    • Jérome Perrin's avatar
      officejs_ooffice: fix duplicate selection names · aeb87775
      Jérome Perrin authored
        'web_page_module_view_web_page_list_selection'
      	'DocumentModule_viewDocumentListAsJioForOofficeSpreadsheetEditor/listbox': set(['erp5_ooffice_spreadsheet_editor'])
      	'DocumentModule_viewDocumentListAsJioForOofficePresentationEditor/listbox': set(['erp5_ooffice_presentation_editor'])
      	'WebPageModule_viewWebPageList/listbox': set(['erp5_web'])
      	'DocumentModule_viewDocumentListAsJioForOofficeTextEditor/listbox': set(['erp5_ooffice_text_editor'])
      	'WebPageModule_viewWebTableListAsJioForWebTableEditor/listbox': set(['erp5_web_table_editor'])
      aeb87775
    • Jérome Perrin's avatar
      officejs_jquery_app: fix duplicate selection name · 6ba340a6
      Jérome Perrin authored
        'image_selection'
      	'ImageModule_viewImageList/listbox': set(['erp5_dms'])
      	'ImageModule_viewImageListAsJioForImageEditor/listbox': set(['erp5_image_editor'])
        'web_page_module_view_web_page_list_selection'
      	'DocumentModule_viewDocumentListAsJioForOofficeSpreadsheetEditor/listbox': set(['erp5_ooffice_spreadsheet_editor'])
      	'DocumentModule_viewDocumentListAsJioForOofficePresentationEditor/listbox': set(['erp5_ooffice_presentation_editor'])
      	'WebPageModule_viewWebPageList/listbox': set(['erp5_web'])
      	'DocumentModule_viewDocumentListAsJioForOofficeTextEditor/listbox': set(['erp5_ooffice_text_editor'])
      	'WebPageModule_viewWebTableListAsJioForWebTableEditor/listbox': set(['erp5_web_table_editor'])
      6ba340a6
    • Jérome Perrin's avatar
      patches: patch OFS to bring back old __repr__ · 3c59d291
      Jérome Perrin authored
      When updating persistent to >= 4.4 __repr__ of zope objects display
      information about ZODB connection, but it's more useful to have
      information about the acqusition chain at this level.
      
      One notable case was proxy field error messages, it was supposed to
      include the path of the proxy field in the error message. This one is
      fixed by fixing the MRO so that persistent.Persistent does not appear
      first.
      3c59d291
    • Jérome Perrin's avatar
      research_item: fix missing selection name · 277a2205
      Jérome Perrin authored
      277a2205
    • Jérome Perrin's avatar
      tests: don't skip testLive* testVifib* · 3c56235c
      Jérome Perrin authored
      There are no testVifib (at least not in nexedi/erp5 repository) and
      there is only one testLive that there is no reason to skip.
      3c56235c
    • Jérome Perrin's avatar
      ingestion_test: fix pylint errors in testLiveIngestion · 4498fe92
      Jérome Perrin authored
      This test never ran because we skip testLive*
      4498fe92
    • Jérome Perrin's avatar
      ingestion: split erp5_ingestion in erp5_ingestion_test · 9a358545
      Jérome Perrin authored
      erp5_ingestion contained a skin folder for tests, with some proxy fields depending on erp5_web.
      There was a proper test dependency to erp5_web, but in static analysis check we now check the skin folders, so it's no longer allowed to have some skin folder that are broken without test dependencies but not supposed to be used outside of tests.
      9a358545
    • Jérome Perrin's avatar
      hr: fix proxy fields · 426a666e
      Jérome Perrin authored
      Since this was using proxy fields from erp5_crm, add dependency on CRM.
      Update to the new name of CRM field library.
      426a666e
    • Jérome Perrin's avatar
      video: fix <video> editor field · e56a6d1b
      Jérome Perrin authored
      nuvalidator complains that:
        Bad value “true” for attribute “autoplay” on element “video”
      
      This could probably be switched to VideoField now.
      e56a6d1b
    • Jérome Perrin's avatar
      VideoField: make valid HTML5 regarding preload · 4d6b0d1d
      Jérome Perrin authored
      Unlike other attributes managed in video field, preload [1] is not a
      boolean attribute, so setting preload="preload" was invalid HTML5.
      
      On the field, we can only configure video_preload as a boolean
      attribute, setting preload="auto" when true and not setting preload when
      False seems the closest meaning of True/False.
      
      [1] https://html.spec.whatwg.org/multipage/media.html#attr-media-preload
      4d6b0d1d
    • Jérome Perrin's avatar
      tiosafe_core: depend on erp5_accounting · 7b76640b
      Jérome Perrin authored
      IntegrationSite_view/my_source_payment is a proxyfield to a field in
      erp5_accounting.
      7b76640b
    • Jérome Perrin's avatar
      post: depend on crm · 75422088
      Jérome Perrin authored
      It uses proxy fields from erp5_crm
      75422088
    • Jérome Perrin's avatar
      project_ui: fix duplicate selection names · db590bb3
      Jérome Perrin authored
         'base_view_document_selection'
      	'Base_viewDocumentList/listbox': set(['erp5_core'])
      	'Project_viewDocumentList/listbox': set(['erp5_web_project'])
         'project_module_selection'
      	'ProjectModule_viewProjectList/listbox': set(['erp5_project'])
      	'ProjectModule_viewProjectManagementList/listbox': set(['erp5_web_project'])
      db590bb3
    • Jérome Perrin's avatar
      officejs: fix duplicate selection names · f83968bc
      Jérome Perrin authored
      These selection names were already used in other business templates:
      
         'web_page_module_view_web_page_list_selection'
      	'WebPageModule_viewWebPageListAsJioForCodemirror/listbox': set(['erp5_officejs_codemirror'])
      	'WebPageModule_viewWebPageListAsJioForTextEditor/listbox': set(['erp5_text_editor'])
      	'WebPageModule_viewWebPageList/listbox': set(['erp5_web'])
      	'DocumentModule_viewDocumentListAsJioForPdfViewer/listbox': set(['erp5_officejs_pdf_viewer'])
         'image_selection'
      	'WebPageModule_viewWebPageListAsJioForSvgEditor/listbox': set(['erp5_officejs_svg_editor'])
      	'ImageModule_viewImageList/listbox': set(['erp5_dms'])
      f83968bc
    • Jérome Perrin's avatar
      CodingStyle: ignore more skins and prefixs · 14c39799
      Jérome Perrin authored
      Module is an acceptable prefix for modules
      
      Introduce a list of skins IDs that does not match our conventions but
      are acceptable because this is what external API are calling.
      14c39799
    • Jérome Perrin's avatar
      core: fix Folder_cut to check relations of sub-objects · 4e87038a
      Jérome Perrin authored
      This `o` was an unused variable. The initial intention was probably
      this.
      4e87038a
    • Jérome Perrin's avatar
      core: fixes for pylint · 0d1411c5
      Jérome Perrin authored
      The general approach is:
      - replace deprecated lambdas with list comprehensions
      - remove unused variables/imports
      - replace dangerous arguments [] with ()
      - replace dangerous arguments {} with None and "if None -> {}"
      - replace builtin names with something similar
      - when really no other choice, line-disable the messages
      
      Now that all problems reported by pylint are fixed, enable coding style
      test.
      0d1411c5
    • Jérome Perrin's avatar
      core: remove unused scripts · 334093d7
      Jérome Perrin authored
      These scripts are not used and does not respect naming conventions or
      have pylint errors.
      334093d7
    • Jérome Perrin's avatar
      core: rename PropertySheetChild_validateIDField · a873eed1
      Jérome Perrin authored
      PropertySheetChild is not an acceptable prefix, use Base as the context
      is used. Technically, this uses the "id as reference" mixin, but this
      mixin is a bit special as it has takes the suffix as parameter and does
      not reside in mixin module, so we just use Base as a prefix.
      a873eed1
    • Jérome Perrin's avatar
      bt5: fix naming convention for FieldValidator_requireIfDialogConfirmed · ecc87d64
      Jérome Perrin authored
      FieldValidator is not an acceptable prefix,
      Base_validateDialogConfirmation seems better
      ecc87d64
    • Jérome Perrin's avatar
      bt5: rename planning box scripts to comply with naming conventions · e51e37ab
      Jérome Perrin authored
      Rounding scripts:
      
      Planning is not an acceptable prefix, this script is called on the
      current context, so let's use Base_ as a prefix.
      
      Planning_roundBoundToMinute → Base_roundPlanningBoxBoundToMinute
      Planning_roundBoundToDay → Base_roundPlanningBoxBoundToDay
      Planning_roundBoundToInt → Base_roundPlanningBoxBoundToInt
      e51e37ab
    • Jérome Perrin's avatar
      administration: fixes for pylint · 55daeefa
      Jérome Perrin authored
      55daeefa
    • Jérome Perrin's avatar
      ERP5Type: define ConstraintMixin._checkConsistency · bc5080c0
      Jérome Perrin authored
      Without this, subclassing defining this method will have arguments-differ
      pylint warning because the signature of Base._checkConsistency is
      different.
      bc5080c0
    • Jérome Perrin's avatar
      forge/administration: move some scripts to administration · 9fc71305
      Jérome Perrin authored
      These scripts are used to check the site configuration and also in
      CodingStyleTest.
      
      This is just the minimal so that CodingStyleTest can run, but this could
      be extended to several scripts currently in erp5_toolbox skinfolder of
      erp5_forge which overlaps with erp5_administration. Also, regarding
      CodingStyleTest, it seems that erp5_administration contain a lot of
      things, so we may want to extract a smaller business template containing
      only the scripts used for static analysis of business template.
      9fc71305
    • Jérome Perrin's avatar
      administration: include new component types in "check source code" · 30e62884
      Jérome Perrin authored
      We want this check to run on all components.
      30e62884
    • Jérome Perrin's avatar
      testXHTML: test portal types also from tools · b1f4cbe4
      Jérome Perrin authored
      Some portal types such as Business Template were not tested by testXHTML
      because this tests started by modules and recursively tests views based
      on allowed content types. Because of this approach, types that are not
      created in a module but in a tool were never tested.
      
      With unittest, the only way to dynamically add test methods to a class
      is to generate a test class in test_suite function. At this stage, the
      ERP5 site is not created yet, so the test had to introspects business
      templates XML.
      
      This now uses a slightly different approach, instead of finding modules
      and chain of allowed content types from business template XML, we only
      use business template to introspect the list of actions.
      The lookup of the appropriate containers is no longer done before setup
      by static analysis of business templates XML, but later once the site is
      created, by dynamic analysis of the modules and allowed content types on
      the running ERP5 site during the test method.
      If we don't find a chain of portal types, we create the test document in
      portal_trash, a tool without filter of content types.
      
      This way, we can test all views of all portal types. This revealed a few
      problems:
       - we need developer role to create components in portal_components, for
      this we add developer role to the current user.
       - Delivery Cell portal type looks not used, there are no container
      accepting it. We don't test delivery cell views for this reason.
       - VCS view on business template needs preferences and working copy
      setup. We just mark this test as expected failure for now.
       - Solver Decision has a form conditionnaly displayed when there's a
      relation to a solver, but this test does not evaluate action conditions
      and does not allow to call a script (that would made it possible to
      modify the document so that the condition is true). For now we also
      mark this as expected failure.
      b1f4cbe4
    • Jérome Perrin's avatar
      immobilisation: remove views from Delivery Cell · bb04dc66
      Jérome Perrin authored
      Delivery Cell is not really used these days and cannot be created in
      testXHTML, so drop these useless views.
      
      For reference, the same views still exists on all other movements portal
      types, so we don't "loose anything important" by removing the views
      here.
      bb04dc66
    • Jérome Perrin's avatar
      budget: mark Budget Transfer view not visible · beca769c
      Jérome Perrin authored
      The corresponding form, BudgetTransfer_viewBudgetTransferLine does not
      exist, so mark view as not visible for now so that it's not tested.
      beca769c
    • Jérome Perrin's avatar
      base: make Geographical Location "View on map" a jump action · c4fb5037
      Jérome Perrin authored
      This redirects to another site, so it is not really a view action.
      
      This also confuses testXHTML.
      c4fb5037
    • Jérome Perrin's avatar
      50a2b27e
    • Jérome Perrin's avatar
      core: support non initialized cache when viewing cache statistics · aa37dc71
      Jérome Perrin authored
      Maybe what's missing is an interaction to update cache internals with
      updateCache when a cache is added, but that's enough to make TestXHTML
      pass now.
      aa37dc71
    • Jérome Perrin's avatar
      ERP5: fix propertysheets for IdGenerator · 1fe4cfe8
      Jérome Perrin authored
      DublinCore was missing, so getCompactTitle was causing AttributeError
      _baseGetTranslatedTitle
      1fe4cfe8
    • Jérome Perrin's avatar
      core: Workaround invalid html on AlarmTool_viewAlarmList · 5f04c239
      Jérome Perrin authored
      When listboxs has an editable field, but the field is non editable, it
      produces a markup like:
        <a href="link to the line"><EditableField/></a>
      This is fine for most fields, but some editable fields are rendered as
      an <input> even if they are not editable - this is the case for
      CheckBoxField.
      To prevent rendering <a><input></a> which is not valid HTML, configure
      the enabled field as non-editable on alarm list view, with this change
      listbox treats the field as an editable field and just render the field
      as <EditableField/> without the <a>.
      To keep the same visual appearance of having a disabled checkbox field,
      make this field disabled with extra.
      5f04c239
    • Jérome Perrin's avatar
    • Jérome Perrin's avatar
      core/forge: fix scripts "Repository History" actions · eddc52b8
      Jérome Perrin authored
      The action was in erp5_core, but the form in erp5_forge. Move the action
      in erp5_forge.
      
      The listbox list method was raising error because it was using catalog
      with unsupported installation_state=. Change to use contentValues
      instead.
      
      This listbox had "Listbox" as a title, use "History" instead, which
      makes a little more sense in this context.
      eddc52b8
  2. 27 Nov, 2019 5 commits