diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2022-11-14 11:30:51 +0700 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2022-11-14 11:30:51 +0700 |
| commit | 5ba5dcedc1c9775d16645608ef988176dbe06bd6 (patch) | |
| tree | 22916cc327946202b40bb396e35664c9944228c4 /indoteknik_api/controllers/api_v1 | |
| parent | bab632a223a0c8809c7629756f895732d288c6ff (diff) | |
fix bug get promotion
Diffstat (limited to 'indoteknik_api/controllers/api_v1')
| -rw-r--r-- | indoteknik_api/controllers/api_v1/product.py | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/indoteknik_api/controllers/api_v1/product.py b/indoteknik_api/controllers/api_v1/product.py index fd6e3477..90a01fa8 100644 --- a/indoteknik_api/controllers/api_v1/product.py +++ b/indoteknik_api/controllers/api_v1/product.py @@ -53,9 +53,6 @@ class Product(controller.Controller): if promotions: coupon_programs = request.env['coupon.program'].search([('id', 'in', promotions.split(','))]) promotion_query = [x for coupon_program in coupon_programs for x in ast.literal_eval(coupon_program.rule_products_domain)] - if len(promotion_query) > 1: - or_in_promotion_query = ["|" for x in range(len(promotion_query) - 1)] - promotion_query = or_in_promotion_query + promotion_query query += promotion_query is_with_detail = True if kw.get('with_detail') == '1' else False |
