Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion wms_connector/models/attachment_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading