Commit Graph
10 Commits
Author SHA1 Message Date
Stanislas Gueniffey ac175c98e1 [IMP] define xml_utils.cleanup_xml_node
Intended to cleanup qweb xmls:
- remove blank (empty) nodes and/or nodes with whitespace text
- fix indentation
- remove indentation (needed for some xml signatures)

closes odoo/odoo#91006

X-original-commit: b7d7adb4f5a9873350511c227d5fbf54c8f38ce8
Signed-off-by: William André (wan) <wan@odoo.com>
2022-05-11 09:21:59 +02:00
Xavier Morel bdc9d9d369 [FIX] core; base: lots of docstrings
* add configuration for `flake8[flake8-rst-docstring]`
* enable docstring-related checks
* fix invalid docstrings in odoo's core & `base`
* fix a few more bits (mostly missing or incorrect `:param:` info
  fields) are out of scope for the lint but my editor catches

closes odoo/odoo#74604

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-12-09 14:36:58 +00:00
william bffb3b7fce [REF] base: clean dosctring and remove deprecated function
The function check_with_xsd has been deprecated for more than 3 years.
Docstring is now compliant with PEP 257

closes odoo/odoo#54338

X-original-commit: 29938397ee17835645e89ee0dadb26e14ef45927
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-07-10 14:18:13 +00:00
william 048c7fef67 [IMP] base: _check_with_xsd from ir.attachment
Search the xsd files from in the database.
To enable this option, the Environment should be passed to the optional
`env` parameter. Both the XSD root and the XSD imported by the root and
the recusrively imported files will be searched in the database.

X-original-commit: 06a35f2e11230db81b8c21696d228097b31cf649
2020-07-10 14:18:12 +00:00
Pierre Rousseau 9ec0455abc [FIX] tools: fixed missing import in xml_utils 2018-01-04 18:58:38 +01:00
Moises Lopez - https://www.vauxoo.com/ 55188da4f4 [REF] tools check_with_xsd: Supports generic stream
In order to be able to use it either with a file or an bystream from an attachment. Was PR #19697
2017-09-29 17:24:39 +02:00
qdp-odoo eaf71455f4 [ADD] tools: add some xml utilities
-create_xml_node()
-create_xml_nod_chain()
2017-08-29 10:17:27 +02:00
Xavier Morel 07ab8b6cd2 [FIX] P3: Exception.message removed 2017-05-12 16:15:40 +02:00
Xavier Morel 3979f6802e [#8530] convert exception handlers to except..as syntax
Futurize fixers:
* lib2to3.fixes.fix_except
2017-04-11 14:53:29 +02:00
qdp-odoo 4a8b088773 [ADD] xml_utils: utilitary file for common xml operations 2017-01-04 16:30:50 +01:00