1. 30 Nov, 2018 1 commit
  2. 21 Nov, 2018 1 commit
  3. 16 Aug, 2018 1 commit
  4. 14 Aug, 2018 1 commit
    • Constraints on currencies instead of required fields · b7cc8ef9
      We have this [Do Not Test Required In Field View Form](https://www.erp5.com/documentation/developer/guideline/module/erp5-Guideline.Module.Creation#do-not-test-required-in-field-view-form rule) rule:
      > This kind of constraint should be defined in Constraints documents and should to be checked in workflow transitions.
      >
      > Checking a field as "required" can cause problems like not saving the data when the user clicks on the save button. The same applies to the use of External Validators scripts in fields.
      
      Currency view was not respecting this, there was both required fields and external validator. 
      Also, the external validator was using an incorrect way of getting the "context document", so it was not working on RenderJS UI.
      
      We are removing required fields and validator here, because this should be implemented using constraints instead.  To somehow preserve the same behavior, a new constraint is added in `erp5_base` and enabled in `erp5_configurator_standard`. Custom projects probably want to enable this constraint, but (as far as I know) we don't enable constraint by default. 
      
      This  `Base_uniqueReferenceInFolderValidator` was apparently not used anywhere else and not working anymore, so we are just removing it.
      
      
      /reviewed-on !710
      Jérome Perrin committed
  5. 27 Jul, 2018 1 commit
    • simulation: solve random solving issues in a cluster environment · 924f20fa
      Before, when solving a solver, parsing sub objects of solver_process was done directly synchronously
      in solver_workflow. And we had the case where you have parallel transactions solving a solver,
      each of theses transactions see remaining solver not in solved state, but once all transaction are
      finished, all solver are solved. This could lead to the case where solver_process is never moved
      to succeeded. Instead of using serialize (which may lead to conflicts), just use activities in queue
      with a serialization tag.
      Sebastien Robin committed
  6. 13 Jul, 2018 3 commits
  7. 05 Jul, 2018 1 commit
  8. 03 Jul, 2018 1 commit
    • all: Replace after_path_and_method_id on reindexation methods by after_tag · 028c9ad7
      after_method_id is too aggressive a dependency.
      after_path_and_method_id is marginally better, but is bad practice
      nevertheless, as such activity dependencies remain very hard to introspect.
      Tags allow more variations, and are hence easier to follow.
      Also, add XXX comments when (recursive) reindexation is only added to
      represent the dependency, without certainty that a reindexation is actually
      needed per-se: maybe another place in the code chould just appropriately
      tag its reindexation activities instead, saving at least the cost of
      spawning one more activity set, and at most the cost of actually
      reindexing these documents.
      Vincent Pelletier committed
  9. 18 Jun, 2018 1 commit
    • Coordinate reachability · f6c56826
      This Merge Request adds ```reachability_workflow``` and adds it to all Coordinate types  (Adress, Email etc.)
      so that the can be marked as ```reachable``` or ```unreachable```.
      It also adds ```coordinate_interaction_workflow```, so that when a coordinate text changes actions can be triggered.
      The default behaviour is that, when coordinate text changes for an 'unreachable' Coordinate, it is marked as reachable.
      
      We already discussed this with @jerome , but I cc @nexedi , since this can break compatibility in projects, because
      in the past Coordinates acquired ```validation_state``` by their parent document (Person, Organisation, etc).
      So now, if some code checks ```getValidationState``` (though it should be checking on the parent) for Coordinate, or searches Catalog with ```validation_state``` (though it should be ```parent_validation_state```), behaviour will change.
      
      Test Result <a href="https://nexedijs.erp5.net/#/test_result_module/20180608-2D68AF16">here</a> seems good (3 failures in UI tests that seem unrelated)
      
      
      /reviewed-on !691
      Georgios Dagkakis committed
  10. 14 Jun, 2018 4 commits
  11. 22 May, 2018 1 commit
  12. 16 May, 2018 2 commits
  13. 04 Apr, 2018 2 commits
    • Merge !496 Replace \r\n by \n in ZSQL Methods' arguments · aa603a2c
      Since 76cc938e we have diffs each time we edit ZSQL Methods. This is a "big commit" to change all remaining ZSQL methods. I checked diffs one by one, but I would appreciate others check this as well and confirm that it's OK to do so.
      
      From the root of repository, I did :
      
      ```
      grep -rl Products.ZSQLMethods.SQL  . | grep '\.xml$' | xargs ~/bin/zsql_backslash_n.py
      ```
      
      With a script containing
      ```python
      
      from lxml import etree
      import sys
      
      for filename in sys.argv[1:]:
        with open(filename) as f:
          tree = etree.parse(f)
          root = tree.getroot()
          for el in tree.xpath('//item/key/string[text() = "arguments_src"]/../../value/string'):
            if el.text:
              el.text = el.text.replace(r'\r\n', r'\n')
      
          # force <string> element to have a text, so that they export as <string></string> and not <string/>
          for el in tree.xpath('//string[not(text())]'):
            el.text = ''
      
        with open(filename, 'w') as f:
          f.write(
              '<?xml version="1.0"?>\n'
              + etree.tostring(root, pretty_print=True, encoding="utf-8"))
      
        print filename
      ```
      ( script snippet: $277 )
      
      /cc @jm @georgios.dagkakis @Nicolas
      
      /reviewed-on !496
      
      Conflicts:
      	product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_getitem_by_path.xml
      	product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_getitem_by_uid.xml
      	product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_produce_reserved_uid_list.xml
      Jérome Perrin committed
    • Merge !504 Do not save documents when there are pending activities · 16de28d5
      When document has pending activities, we refuse changing ID ( because there might be pending `updateRelatedContent` activities if I remember correctly ), but it's done in a way that breaks the "atomic" aspect of the transaction a bit, because we
      
      As a result, this happens sometimes that not all properties user changed are modified. In the example below, the change to *Include Documents in Site Map* is not saved (and also change to *ID*):
      
      ![erp5-sorryPendingActivitiesSavePartially](/uploads/ff4bfd6ad0e8a42ba3684cccdc450e21/erp5-sorryPendingActivitiesSavePartially.gif)
      
      ( screencast of editing a document to change ids and several other
      properties - after clicking save, we can see that changing id is refused
      because there is pending activities. Other properties that where changes
      at the same times are not all modified, which breaks the
      transactionality we can usally expect when editing documents in ERP5 )
      
      The changed here is to use a field validator that refused editing when there are pending activities, so that user gets a:
      
      ![erp5-pending-activiities](/uploads/bfe825560bdee34f0443e8e36884f21c/erp5-pending-activiities.png)
      
      ( screenshot of the change: now edition is rejected )
      
      and the result is either all changes are applied or no change is applied at all.
      
      This is done by:
       * introducing a new `my_view_mode_id` field in `erp5_core`'s `Base_viewFieldLibrary`
       * using this field as proxy field of all editable `my_id` fields. Maybe I forgot some business templates, I changed only the most common ones. I intentionally did not change all fields of `erp5_ui_test` because I think they are used to compare speed of proxy fields vs traditional fields.
      
      0352f50fd543fda2712bb8ca93d8a8814f975a26 introduces a Zelenium test exercising this new behavior.
      
      /reviewed-on !504
      
      Conflicts:
      	product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewFieldLibrary.xml
      Jérome Perrin committed
  14. 30 Mar, 2018 3 commits
    • Add several Post Modules, to track ERP5 interfaces' exchanges · 22940854
      Add "Post Modules", a serie of modules whose purpose is to track exchanges in/out of ERP5.
      
      Currently, users write Mail Messages (usually as a HTML content), and then send the Mail Message. The RFC5322 version of the email (what is given to MailHost and sent over the network) is generated on the fly and never stored anywhere. About Letter, no output is generated. It means that exchanges are not tracked, and if an Event is sent 2 times, we don't know their exact content on both times.
      
      Posts have the purpose to fix this issue, by creating objects storing the content of the sent Events **exactly as they are transmitted out of ERP5**. In exemple, sent Mail Messages will be converted to a  multi-part message, stored as a Internet Message Post, which content will be transmitted as such to MailHost. For Letters, their content can be processed (by erp5_corporate_identity for exemple), then converted to PDF, and stored as Letter Post. We can then imagine actions/alarms to gather all exportable Letters Posts and mail them to a printer.
      
      Posts follow their own workflow, shared in between all post types, which allow to track which posts are in the sending queue, which have been sent and which have been received. It must be easy to know when an event has been sent several time, and retrieve the content of each of these sendings. Design of the post modules/workflow should also allow an easy customization (for exemple, we may want to send all emails by bulk, instead of  1 by 1, in order to set up mass-emailing policies).
      
      /reviewed-on !532
      Nicolas Wavrant committed
  15. 05 Mar, 2018 2 commits
  16. 16 Feb, 2018 1 commit
  17. 14 Feb, 2018 1 commit
  18. 26 Dec, 2017 2 commits
  19. 15 Dec, 2017 1 commit
  20. 27 Nov, 2017 1 commit
  21. 16 Nov, 2017 1 commit
    • *: replace \r\n by \n in ZSQL Methods' arguments · 2adf9084
      From the root of repository, I did :
      
      grep -rl Products.ZSQLMethods.SQL  . | grep '\.xml$' | xargs ~/bin/zsql_backslash_n.py
      
      With a script containing
      ```python
      
      from lxml import etree
      import sys
      
      for filename in sys.argv[1:]:
        with open(filename) as f:
          tree = etree.parse(f)
          root = tree.getroot()
          for el in tree.xpath('//item/key/string[text() = "arguments_src"]/../../value/string'):
            if el.text:
              el.text = el.text.replace(r'\r\n', r'\n')
      
          # force <string> element to have a text, so that they export as <string></string> and not <string/>
          for el in tree.xpath('//string[not(text())]'):
            el.text = ''
      
        with open(filename, 'w') as f:
          f.write(
              '<?xml version="1.0"?>\n'
              + etree.tostring(root, pretty_print=True, encoding="utf-8"))
      
        print filename
      ```
      Jérome Perrin committed
  22. 04 Nov, 2017 1 commit
  23. 31 Oct, 2017 1 commit
  24. 30 Oct, 2017 1 commit
    • erp5_base: add Organisation's registration code and VAT code in their searchable text · 1e2ebd69
      It is a common (CRM principally) use case to search for Organisations using official identifying unique codes, as the registration code or the VAT code.
      
      There is currently no way in ERP5 to look for entities using these unique codes, as they are not-generic enough to be indexed. For the same reason, creating a new table(s) to index Entities' identifiers may give something too blured to reach a consensus on. In my opinion fulltext search is a good solution for this case, and it shouldn't create compability issues for current projects. 
      
      If it is thought necessary, I can also add the Social Security Code (for Organisations/Persons) in the searchable text properties, but it is a more complicated topic as it isn't a public information.
      
      @nexedi 's project managers, what are your thoughts on it ?
      
      /reviewed-on !463
      Nicolas Wavrant committed
  25. 25 Oct, 2017 1 commit
  26. 16 Oct, 2017 1 commit
  27. 13 Oct, 2017 1 commit
  28. 01 Sep, 2017 1 commit
    • ERP5Catalog: add strict_language argument in getDocumentValueList(). · bd7e05f4
      If strict_language is False, a document having the other language is
      chosen if the specified language one is missing.
      
      all_languages=True returns results grouped by (reference, language) so
      that we can have several documents for a single reference.
      
      strict_language=False returns results grouped by (reference,) only,
      with considering the language priority, thus we have only one document
      for a single reference.
      Kazuhiko Shiozaki committed
  29. 25 Aug, 2017 1 commit