1. 20 Jul, 2020 1 commit
    • Jérome Perrin's avatar
      ERP5OOo: don't fail exporting documents with control character · e4e12259
      Jérome Perrin authored
      if for some reason an ERP5 document has some control characters in title of
      description and is exported in ODS/ODT, the export will fail with an etree
      error like this:
      
          Exception:
            Module Products.CMFActivity.ActivityTool, line 356, in __call__
                result = method(*self.args, **self.kw)
            Module Products.ERP5Type.patches.PythonScript, line 179, in __call__
                return self._orig_bindAndExec(args, kw, None)
            Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
                return self._exec(bound_data, args, kw)
            Module Products.PythonScripts.PythonScript, line 344, in _exec
                result = f(*args, **kw)
            Module script, line 15, in Base_renderSimpleView
            - <PythonScript at /erp5/Base_renderSimpleView used for /erp5/sale_packing_list_module>
            - Line 15
                report_data = getattr(context, deferred_style_dialog_method)(**params)
            Module AccessControl.ZopeGuards, line 369, in guarded_apply
                return builtin_guarded_apply(func, args, kws)
            Module AccessControl.ZopeGuards, line 391, in builtin_guarded_apply
                return func(*arglist, **argdict)
            Module Products.ERP5Form.Form, line 705, in __call__
                return pt.pt_render(extra_context=extra_context)
            Module Products.ERP5OOo.OOoTemplate, line 484, in pt_render
                extra_context, request)
            Module Products.ERP5OOo.OOoTemplate, line 422, in renderIncludes
                xml_doc = etree.XML(text)
            Module lxml.etree, line 3192, in lxml.etree.XML (src/lxml/lxml.etree.c:78763)
            Module lxml.etree, line 1848, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:118341)
            Module lxml.etree, line 1736, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:117021)
            Module lxml.etree, line 1102, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:111265)
            Module lxml.etree, line 595, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:105109)
            Module lxml.etree, line 706, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:106817)
            Module lxml.etree, line 635, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:105671)
          XMLSyntaxError: PCDATA invalid Char value 20, line 228761, column 21 (line 228761)
      
      This is because XML does not accept the full range of characters, there are a
      few characters that are not allowed.
      
      To prevent these errors, we replace these invalid characters by an error
      character (�) before manipulating the XML with lxml.
      e4e12259
  2. 17 Jul, 2020 4 commits
    • Xiaowu Zhang's avatar
      erp5_l10n_zh: update translation · 0c5f6dc7
      Xiaowu Zhang authored
      See merge request !1193
      0c5f6dc7
    • Arnaud Fontaine's avatar
    • Gabriel Monnerat's avatar
      fixup! web_renderjs_ui: enable google login · 64635469
      Gabriel Monnerat authored
      It seems that with ${here/portal_url} returns the ERP5 url , for example http://nohost/erp5 instead of
      
      http://nohost/erp5/web_site_module/renderjs_runner/
      64635469
    • Jérome Perrin's avatar
      "Disable Node" option for categories · fced4e25
      Jérome Perrin authored
      Since a89afa43 (Formulator: Support disabled items in all ItemWidget subclasses., 2014-04-02) we can include disabled items in listfields.
      This was used for example in erp5_crm to show the services with their hierarchy as disabled items and was useful to display the hierarchy.
      
      In some fields, we don't want user to select "nodes" categories, but only select "leaves" categories (ie. select the most precise category).
      This always had a problem when using "Indented title" as display method for categories, because the user can not see the actual hierarchy. This is about making it possible to display hierarchy of categories in this case where we select only leaves, so that it displays like this:
      
      ![screenshot of a category with disabled items for hierarchy](/uploads/0f3e8ef68ab6e2ec424e4e8d42fc5e2a/image.png)
      
      This required to:
      
       - introduce a new category API, `disable_node`, which is semantically very close to `filter_node` except that instead of filtering out node categories that are kept with `None` as related URL. Symmetrically, we also introduce `disable_leave`
       - make `ParallelListField` support disabled items. Even if this was properly supported in underlying fields, some parts in `ParallelListField` did not differentiate between `None` and `''`.
       - modify several forms to use `disable_node` instead of `filter_node`
      
      See merge request nexedi/erp5!1199
      fced4e25
  3. 16 Jul, 2020 5 commits
  4. 15 Jul, 2020 5 commits
  5. 14 Jul, 2020 1 commit
    • Jérome Perrin's avatar
      invoicing: "section category" fields in field library · 2df5287b
      Jérome Perrin authored
      Unlike trade and like accounting, for invoice we are using "Section Category"
      term for section category, it's no longer about "who is the owner of this
      stock" like in trade, but already "who is the entity" like in accounting
      2df5287b
  6. 13 Jul, 2020 23 commits
  7. 10 Jul, 2020 1 commit