diff --git a/odoo/tools/xml_utils.py b/odoo/tools/xml_utils.py index be0d5878677..1d1713d8125 100644 --- a/odoo/tools/xml_utils.py +++ b/odoo/tools/xml_utils.py @@ -156,8 +156,9 @@ def load_xsd_files_from_url(env, url, file_name=None, force_reload=False, request_max_timeout=10, xsd_name_prefix='', xsd_names_filter=None, modify_xsd_content=None): """Load XSD file or ZIP archive. Save XSD files as ir.attachment. - An XSD attachment from the database is identified by its prefixed `file_name`. A typical prefix is the - calling module name. + An XSD attachment is saved as {xsd_name_prefix}.{filename} where the filename is either the filename obtained + from the URL or from the ZIP archive, or the `file_name` param if it is specified and a single XSD is being downloaded. + A typical prefix is the calling module's name. For ZIP archives, XSD files inside it will be saved as attachments, depending on the provided list of XSD names. ZIP archive themselves are not saved. @@ -168,7 +169,7 @@ def load_xsd_files_from_url(env, url, file_name=None, force_reload=False, :param odoo.api.Environment env: environment of calling module :param str url: URL of XSD file/ZIP archive - :param str file_name: the name given to the XSD attachment + :param str file_name: used as attachment name if the URL leads to a single XSD, otherwise ignored :param bool force_reload: Deprecated. :param int request_max_timeout: maximum time (in seconds) before the request times out :param str xsd_name_prefix: if provided, will be added as a prefix to every XSD file name