1. 23 Aug, 2022 19 commits
    • Gabriel Monnerat's avatar
      CUSTOM erp5_crm: Re-organise columns from listbox · 5d6156ad
      Gabriel Monnerat authored
      According to Galien:
      
      In the table, columns to be displayed by default in the following order are :
      - Title
      - Visa File Reference
      - Type
      - Requester
      - Begin Date
      - Comment Date (with possibility to sort the table by this column desc and asc)
      - Comment Author
      - State
      5d6156ad
    • Gabriel Monnerat's avatar
      CUSTOM erp5_crm: Left padding of reference to Support Request · 02030ccb
      Gabriel Monnerat authored
      With this, sort by reference will work properly
      02030ccb
    • Gabriel Monnerat's avatar
    • Gabriel Monnerat's avatar
      CUSTOM erp5_officejs_support_request: Add visa_file_reference as parameter and... · 3ac558e0
      Gabriel Monnerat authored
      CUSTOM erp5_officejs_support_request: Add visa_file_reference as parameter and redirect to the expected view
      
      In support request, we need to receive visa_file_reference and store it as causality. With this, we have the relation between Support Request and Visa File
      
      Also, we change the action reference because the previous is not available in our scenario(Default View Action reference).
      3ac558e0
    • Gabriel Monnerat's avatar
      CUSTOM erp5_officejs_support_request: Add field to pass visa file reference in Support Request · 449bb91a
      Gabriel Monnerat authored
      This will be used by Capago to assign a Support Request to Visa File
      449bb91a
    • Gabriel Monnerat's avatar
      CUSTOM: Configure listbox to hide all buttons · 0e738b1a
      Gabriel Monnerat authored
      Requested in an email from Galien Renault with title "Retour livraison interface consulaire" document "Retour livraison Interface Consulaire ERP5 .pdf". Suppression des boutons d’action : “Sort” / “Edit” / “Select” , section 4.1.4, item a, page 14
      0e738b1a
    • Gabriel Monnerat's avatar
      HACK: Hide Configure and Sort buttons · 625384da
      Gabriel Monnerat authored
      Requested in an email from Galien Renault with title "Retour livraison interface consulaire" document "Retour livraison Interface Consulaire ERP5 .pdf" Suppression des boutons d’action : "Sort ", page 4.1.4 item A, page 14
      625384da
    • Gabriel Monnerat's avatar
      CUSTOM: hide columns to select and edit because are useless to display last Suport Requests · 5444a7f2
      Gabriel Monnerat authored
      > email from Galien Renault with title "Retour livraison interface consulaire" document "Retour livraison
      > Interface Consulaire ERP5 .pdf" Suppression des boutons d’action : ““Edit” / “Select”, page 4.1.4 item a page 14
      5444a7f2
    • Gabriel Monnerat's avatar
      CUSTOM erp5_crm: Hide action "Make a template" to Support Request · 2085b51b
      Gabriel Monnerat authored
      Requested in an email from Galien Renault with title "Retour livraison
      interface consulaire" document "Retour livraison Interface Consulaire
      ERP5.pdf", section 4.1.4d page 16
      2085b51b
    • Gabriel Monnerat's avatar
      CUSTOM erp5_crm: Remove action to create new event in Support Request · 12d207c3
      Gabriel Monnerat authored
      Requested in an email from Galien Renault with title "Retour
      livraison interface consulaire" document "Retour livraison Interface
      Consulaire ERP5.pdf", part 3.2.2c page 10
      
      - Il devrait être impossible de crée"New Event" pour un
      ticket au statut "Closed"
      
      This action is not suppose to work, because they should a new post in the Suppport Request instead of a new event directly.
      12d207c3
    • Gabriel Monnerat's avatar
      erp5_officejs_support_request_ui: Avoid to hardcode sort_on in the python script · 92040e26
      Gabriel Monnerat authored
      Because this breaks the sort and filter buttons in the new ERP5 UI
      92040e26
    • Gabriel Monnerat's avatar
      CUSTOM erp5_officejs_support_request_ui: Display causality reference(Visa File... · 7e9f560c
      Gabriel Monnerat authored
      CUSTOM erp5_officejs_support_request_ui: Display causality reference(Visa File Reference) from Support Request
      
      Requested in an email from Galien Renault with title 'Retour livraison interface consulaire' document 'Retour livraison Interface Consulaire ERP5.pdf' V1.0 2020-04-31 section 3.2.1 page 9 and 3.1.9d page 8.
      
      - Rajouter la colonne "Visa Files Reference" en valeur par défaut de l liste 'Recent Update'
      - La valeur du champ "Visa File Reference" doit etre la reference TESTVFXXX et non le nom du requester
      7e9f560c
    • Gabriel Monnerat's avatar
      CUSTOM erp5_crm: disable "Attach Document" action on support request · f3646aaa
      Gabriel Monnerat authored
      In this custom support request app, document are sent as items in packing lists
      and the default "Attach Document" action is confusing, because we have a
      "Create New Document" action which creates the document as an item with its
      initial implicit movement.
      f3646aaa
    • Jérome Perrin's avatar
      accounting: rework Organisation_getMappingRelatedOrganisation ( WIP ) · 188226f0
      Jérome Perrin authored
      This script was returning organisations in random order !
      
      When organisation does not have accounting periods, but another organisation at the same level of the same group has, the result was undefined.
      
      This fixes by considering all organisation from the same group.
      188226f0
    • Gabriel Monnerat's avatar
    • Jérome Perrin's avatar
      WIP: Inventory api: interpolation + group by time sequence · 1c2b6315
      Jérome Perrin authored
      jerome/erp5!6 rebased and in a big
      commit so that we can start using that
      SimulationTool: implement "linear" flow API
      
      testInventoryAPI: silent pyflakes warnings
      
      more interpolation implementation
      
      inventory_list interpolation flow: support at_date & to_date
      
      more and more interpolation API
      
      interpolation
      
      interpolation
      
      group_by_time_sequence_list
      
      testInventoryAPI: move inventory valuation methods in a dedicated test class
      
      This should not be in test inventory list.
      
      test: move Tracking API to a dedicated test module
      
      inventory api: dirty way of disabling cache if keys such as node_category are used.
      
      interpolation: security on SimulationTool_zGetInterpolationMethod
      
      SimulationTool_zGetInterpolationMethod is called in restricted context
      of Resource_zGetMovementHistoryList so it needs to be usable by
      anonymous.
      
      ZSQL Method does not read parameters from REQUEST, so it looks safe.
      
      inventory_api: rely on catalog to add slot_index in the query
      
      instead of implementing this logic in ZSQL's DTML
      1c2b6315
    • Jérome Perrin's avatar
    • Jérome Perrin's avatar
      ERP5: workaround Domain.getPrice that cannot lookup price · a058d6a7
      Jérome Perrin authored
      because Domain.getRelativeUrl (and Category.getRelativeUrl) cannot be
      restrictedTraverse'd
      a058d6a7
    • Jérome Perrin's avatar
      core,monaco_editor: python language support 🚧 · d2b29af1
      Jérome Perrin authored
      some work in progress changes to improve developer experience
      
      monaco_editor: increase debounce timeout for pylint checks XXX
      
      on very large python files (>1000 lines) sometimes they queue up and we
      have to wait for all requests that were queued by zope.
      
      XXX maybe this does not happen when accessing through haproxy/apache, I
      am observing this when hitting zope directly
      
      jedi: generate stubs WIP
      
      ERP5: "quick and dirty" type annotations XXX
      
      IIRC the only thing needed is that ERP5TypeTestCase.getPortal is an
      ERP5Site
      
      monaco_editor: also enable jedi for codelens ( WIP: ZMI only )
      
      core: pass "language support url" to text editors XXX
      
      For now this is just the portal_url, but I'm thinking it could be a
      proper tool.
      
      monaco_editor: enable pylint in gadget version
      
      because pylint is a bit slow on large components, debounce every 2
      seconds. TODO: this is too slow.
      
      monaco_editor: enable formatting provider for python
      
      This makes "Format Document" / "Format Selection" work.
      
      monaco_editor: enable completion provider for python
      
      this makes completions works when using Ctrl+space
      
      monaco_editor: pass portal_type to checkPythonSourceCode
      
      python_support: new business template to act as a language server for python
      
      checkPythonSourceCode: add a cache
      
      When using checkPythonSourceCode integrated in the source code editor,
      for a scenario where developer edit a component and save we can benefit
      from caching the check message for the source code content, because the
      same check that the one happening in the editor will happen when the
      component is saved.
      
      This cache varies on:
       - "component_packages" cache cookie which is reset every time some
      component code is edited.
       - zope startup time to take into account editions of file system code.
      This assumes that after reseting file system code zope will be
      restarted.
       - portal_type, because the checks performed by this function also
      depend on portal type.
      
      jedi wip
      
      administration: keep using pylint only for now
      
      monaco_editor: jedi WIP
      
      core: use mypy to check python code ( WIP experiment )
      
      Revert "core: use mypy to check python code ( WIP experiment )"
      
      This reverts commit cfa27232.
      
      ERP5TypeTestCase: jedi workarounds
      
      monaco_editor: WIP reference provider for python
      
      monaco_editor: jedi wip (no longer use /tmp/)
      
      yapf: adjust config following up Gabriel feedback
      d2b29af1
  2. 18 Aug, 2022 6 commits
    • Jérome Perrin's avatar
      Listbox,SelectionTool: use make_query instead of crafting URL manually · 3cb786cc
      Jérome Perrin authored
      Using make_query makes sure that the query parameters are properly
      encoded and also change selection_index to become an int, because
      it keeps the type of parameters.
      
      As a consequence, we had to adjust a few place in the code where
      selection_index was tested for truthiness: because "0" as a string is
      true, but 0 as an int is not. For that, we changed to test the presence
      of selection_name instead of testing selection_index, as they are always
      used together.
      
      This fixes a problem that & in URL was encoded twice for listbox
      anchor links ( bug_module/1137 )
      3cb786cc
    • Jérome Perrin's avatar
      *: reorganise indexation methods · 2bd1d4ed
      Jérome Perrin authored
      02011d8e (immediateReindexObject: use super user to reindex script,
      2015-12-14) did not apply for inventory, because they were overloading
      immediateReindexObject.
      Introduce a new level, _immediateReindexObject that will hold the actual
      reindexing logic.
      
      Previously this method was using PortalContent.reindexObject which was
      monkey patched, to make things less complex and more future proof, move
      the monkey patch to a method on base class.
      
      This also drops alternateReindexObject on BalanceTransaction, because it
      is already defined in Inventory
      2bd1d4ed
    • Jérome Perrin's avatar
      ERP5TypeLiveTestCase: close request at the end of each test · e605544e
      Jérome Perrin authored
      This is supposed to fix "Should not load state for ${oid of a skin} when
      the connection is closed" sometimes happening with live tests (especially
      when the test self.publish and the developer access the site while the
      test is suspended on a debugger breakpoint).
      
      The object accessed after the connection is closed was a skin (python
      script, sometimes page template or form) that was cached in SKINDATA.
      The mechanism to prune entries from the cache uses REQUEST.hold API
      which expects that REQUEST.close is called on request, but because
      requests were not closed at the end of the request, it happened that
      the cache was reused from another connection.
      
      This change to close the requests, like ERP5TypeTestCase is doing in
      tearDown (the actual close is done by Testing.ZopeTestCase.connections).
      
      By closing requests at the end of tests, we also have to change so that
      at the beginning of the test we initialize the request, by using the same
      setSite and setupCurrentSkin that are done in ERP5TypeTestCase.
      e605544e
    • Jérome Perrin's avatar
      ProxyField: use Skinnable API to get current skin · 8a8f9384
      Jérome Perrin authored
      SKINDATA is an implementation detail that should not be accessed from
      this level.
      8a8f9384
    • Jérome Perrin's avatar
      BusinessTemplate: drop useless fixZSQLMethod in SkinTemplateItem.install · 45e45842
      Jérome Perrin authored
      In SkinTemplateItem.install, self._objects contains entries for skin
      folders and for all skins. objectValues method calls was called for skin
      folders (as expected) and also for all skins, which acquire objectValues
      from skin folder and do the work again.
      
      This simplifies this by only running this for skin folders.
      45e45842
    • Jérome Perrin's avatar
      Listbox: refactor computation of "default" URL · 9ca9d73d
      Jérome Perrin authored
      "default" URL is the URL when listbox column does not use URL column
      and when the brains do not have a getListItemUrl method.
      
      Move the computation in a lazyMethod, so that it is computed only once
      per line instead of once per cell.
      
      Also remove a try/except, I don't think this code is supposed to get an
      AttributeError
      9ca9d73d
  3. 09 Aug, 2022 2 commits
  4. 02 Aug, 2022 10 commits
  5. 28 Jul, 2022 1 commit
  6. 13 Jul, 2022 1 commit
    • Jérome Perrin's avatar
      accounting: fix grouping dialog loosing section category on next page · 0d8242de
      Jérome Perrin authored
      In xhtml_style, just after clicking next or previous page in the listbox
      buttons, the values selected in 'Section Category' and 'Section Category
      Strict' were not used, because they were used from request and not from
      as normal script parameters.
      
      This fixes only the xhtml_style version, ERP5JS has another problem that
      dialog fields values are reset when going to next page, so it would also
      need this problem to be fixed.
      0d8242de
  7. 12 Jul, 2022 1 commit