Skip to content

Commit

Permalink
wms_conne: return attachment queue
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienbeau committed Dec 14, 2023
1 parent 8756b21 commit d18a784
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wms_connector/models/synchronize_exportable_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,13 @@ def _get_export_data(self):
yield records, data

def synchronize_export(self):
attachments = self.env["attachment.queue"]
for records, data in self._get_export_data():
vals = self._format_to_exportfile(data)
attachment = self.env["attachment.queue"].create(vals)
records.track_export(attachment)
attachments |= attachment
return attachments

def track_export(self, attachment):
self.wms_export_date = datetime.datetime.now()
Expand Down

0 comments on commit d18a784

Please sign in to comment.