diff --git a/wms_connector/models/attachment_queue.py b/wms_connector/models/attachment_queue.py index 56381fac80e..835eb33d17b 100644 --- a/wms_connector/models/attachment_queue.py +++ b/wms_connector/models/attachment_queue.py @@ -46,8 +46,12 @@ def _compute_warehouse(self): else: rec.warehouse_id = None + @api.model + def _get_mappings(self): + return WMS_IMPORT_FILETYPES + def _run(self): - for filetype in [el[0] for el in WMS_IMPORT_FILETYPES]: + for filetype in [el[0] for el in self._get_mappings()]: if self.file_type == filetype: return getattr(self.with_company(self.company_id), "_run_" + filetype)() return super()._run()