Remove encoding declaration from XML view

It's no longer supported in lxml:

      File "/opt/odoo/external-src/server-tools/server_environment/serv_config.py", line 228, in _build_osv
        cls._arch = etree.fromstring(arch)
      File "src/lxml/lxml.etree.pyx", line 3213, in lxml.etree.fromstring (src/lxml/lxml.etree.c:82934)
      File "src/lxml/parser.pxi", line 1814, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:124471)
    ValueError: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.
This commit is contained in:
Guewen Baconnier 2017-11-15 15:18:49 +01:00 committed by Stéphane Bidoul (ACSONE)
parent d446152585
commit bce8bbfb6e
No known key found for this signature in database
GPG Key ID: BCAB2555446B5B92
1 changed files with 1 additions and 2 deletions

View File

@ -199,8 +199,7 @@ class ServerConfiguration(models.TransientModel):
@classmethod @classmethod
def _build_osv(cls): def _build_osv(cls):
"""Build the view for the current configuration.""" """Build the view for the current configuration."""
arch = ('<?xml version="1.0" encoding="utf-8"?>' arch = ('<form string="Configuration Form">'
'<form string="Configuration Form">'
'<notebook colspan="4">') '<notebook colspan="4">')
# Odoo server configuration # Odoo server configuration