1. 16 Nov, 2017 1 commit
    • Jérome Perrin's avatar
      *: replace \r\n by \n in ZSQL Methods' arguments · 2adf9084
      Jérome Perrin authored
      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
      ```
      2adf9084
  2. 15 Nov, 2017 10 commits
  3. 14 Nov, 2017 3 commits
  4. 13 Nov, 2017 1 commit
    • Georgios Dagkakis's avatar
      Add an API to be able to construct urls · d0b83543
      Georgios Dagkakis authored
      This merge request is trying to provide an API so that we can construct urls in a more organised manner than manipulating strings.
      
      The motivation, started from this merge request: nexedi/erp5!333, where absolute_url is overriden for Web Section and Web Site. Then we found that we have to do many dirty changes like:
      ```
                    absolute_url python: here.absolute_url();
                    absolute_url python: absolute_url[:-1] if absolute_url.endswith('/') else absolute_url;
      ```
      (more of those in nexedi/erp5@f601d7a5).
      
      So we said we should make an API to have an organised manner, like we have e.g. Base_redirect to handle redirects.
      
      - First commit adds this as a script in erp5_core, along with a test.
      - Second commit uses it. It is not on my scope to change all erp5 code, but I focused on changing on the things I already had to in
      nexedi/erp5@f601d7a5
      
      @romain , @kazuhiko please make comments. Tests passed, but not on the final revision (did some amendments) and I think better not to re-run suite  before getting comments. Also, @tatuya , I think you are responsible for ERP5 interfaces, so I would like your opinion if erp5_core is the good place, or maybe some other BT or product.
      
      My plan would be to merge this and then nexedi/erp5!333 rebased on this. But in any-way this should be separate from nexedi/erp5!333.
      
      /reviewed-on nexedi/erp5!431
      d0b83543
  5. 10 Nov, 2017 7 commits
  6. 09 Nov, 2017 2 commits
  7. 08 Nov, 2017 3 commits
  8. 07 Nov, 2017 3 commits
  9. 06 Nov, 2017 7 commits
  10. 04 Nov, 2017 3 commits