diff --git a/pattern_import_export/models/pattern_file.py b/pattern_import_export/models/pattern_file.py index ccbe4879..ab6e6912 100644 --- a/pattern_import_export/models/pattern_file.py +++ b/pattern_import_export/models/pattern_file.py @@ -170,6 +170,11 @@ def split_in_chunk(self): previous_idx = idx if items: self._create_chunk(start_idx, idx, items) + else: + # document has an header and no data lines + # valid document. So create a dummy chunk + # to have progression and status + self._create_chunk(-1, -1, []) except Exception as e: self.state = "failed" self.info = _("Failed to create the chunk: %s") % e diff --git a/pattern_import_export/readme/CONTRIBUTORS.rst b/pattern_import_export/readme/CONTRIBUTORS.rst index bd541f8a..f720d113 100644 --- a/pattern_import_export/readme/CONTRIBUTORS.rst +++ b/pattern_import_export/readme/CONTRIBUTORS.rst @@ -2,3 +2,4 @@ * Sébastien Beau * François Honoré (ACSONE SA/NV) * Kevin Khao +* Raphaël Reverdy