summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/voucher.py
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-09-11 13:10:24 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-09-11 13:10:24 +0700
commit9a630354c1d00e218595db9b2e8cd0b7df9ed97c (patch)
treed3275f79dbf6757bbf41bf7a509777e9be76c529 /indoteknik_custom/models/voucher.py
parent5c5c0bbcb7ad09a8951b8ee2800b73e7a2ab8c8d (diff)
Fix feature
- Fix voucher API - Add field shipping status on stock picking
Diffstat (limited to 'indoteknik_custom/models/voucher.py')
-rw-r--r--indoteknik_custom/models/voucher.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/indoteknik_custom/models/voucher.py b/indoteknik_custom/models/voucher.py
index 720c465e..4865db2f 100644
--- a/indoteknik_custom/models/voucher.py
+++ b/indoteknik_custom/models/voucher.py
@@ -114,14 +114,11 @@ class Voucher(models.Model):
return round(calculate_time.total_seconds())
def filter_order_line(self, order_line):
- if self.apply_type == 'all':
- return order_line
-
voucher_manufacture_ids = self.collect_manufacture_ids()
results = []
for line in order_line:
manufacture_id = line['product_id'].x_manufacture.id or None
- if manufacture_id not in voucher_manufacture_ids:
+ if self.apply_type == 'brand' and manufacture_id not in voucher_manufacture_ids:
continue
product_flashsale = line['product_id']._get_active_flash_sale()