diff options
| author | Mqdd <ahmadmiqdad27@gmail.com> | 2025-12-23 11:08:47 +0700 |
|---|---|---|
| committer | Mqdd <ahmadmiqdad27@gmail.com> | 2025-12-23 11:08:47 +0700 |
| commit | 24c863b30575eca63efe245b4b25c92e1ce3f4d6 (patch) | |
| tree | 61ade1c16d67bcb4bb53512a1350e14c933f342e /fixco_custom/models/upload_ginee.py | |
| parent | 175b10a298185a724b7c0f8d0d25beec38b4f0e1 (diff) | |
| parent | aeeecacfe7b10ebbdefe5284f98e9e9f37c1b8d1 (diff) | |
Merge branch 'main' of https://bitbucket.org/altafixco/fixco-addons
merge
Diffstat (limited to 'fixco_custom/models/upload_ginee.py')
| -rw-r--r-- | fixco_custom/models/upload_ginee.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fixco_custom/models/upload_ginee.py b/fixco_custom/models/upload_ginee.py index 8cb07cf..cdfa3a8 100644 --- a/fixco_custom/models/upload_ginee.py +++ b/fixco_custom/models/upload_ginee.py @@ -162,6 +162,7 @@ class UploadGinee(models.Model): self.ginee_lines.create_so_and_detail_order() def action_get_order_id_and_create_detail_order(self): + self.date_upload = datetime.utcnow() self.ginee_lines.get_order_id() self.ginee_lines.create_so_and_detail_order() @@ -255,6 +256,8 @@ class UploadGineeLine(models.Model): # First group BLIBLI orders by their invoice prefix grouped_lines = {} for rec in self: + if rec.detail_order_id: + continue if rec.upload_ginee_id.upload_type == 'blibli' and '-' in rec.invoice_marketplace: prefix = rec.invoice_marketplace.split('-')[0] if prefix not in grouped_lines: @@ -306,6 +309,7 @@ class UploadGineeLine(models.Model): line.message_error = str(e) def get_order_id(self): + for rec in self: try: if rec.order_id: |
