diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2024-07-03 02:13:09 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2024-07-03 02:13:09 +0000 |
| commit | be81dd2570b45de430db12ecb668f2e4df25d01b (patch) | |
| tree | efa23be9ae47d1b07ff9d45975814f8e2a6144a4 /indoteknik_custom/models | |
| parent | 7be7fa7270fba7bca47a1838ef569710875960f0 (diff) | |
| parent | 77c4f329788de87938c971de525b9717844978b8 (diff) | |
Merged in feature/iman_sequence (pull request #153)
<iman> add sequence to program promotion line
Diffstat (limited to 'indoteknik_custom/models')
| -rw-r--r-- | indoteknik_custom/models/promotion/promotion_program_line.py | 1 | ||||
| -rw-r--r-- | indoteknik_custom/models/solr/promotion_program_line.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/indoteknik_custom/models/promotion/promotion_program_line.py b/indoteknik_custom/models/promotion/promotion_program_line.py index 34b70ca5..d253c68d 100644 --- a/indoteknik_custom/models/promotion/promotion_program_line.py +++ b/indoteknik_custom/models/promotion/promotion_program_line.py @@ -23,6 +23,7 @@ class PromotionProgramLine(models.Model): display_on_homepage = fields.Boolean('Display on Homepage') price = fields.Float('Price') + sequence = fields.Integer(string='Sequence', default=0) discount_type = fields.Selection([ ("percentage", "Percentage"), ("fixed", "Fixed") diff --git a/indoteknik_custom/models/solr/promotion_program_line.py b/indoteknik_custom/models/solr/promotion_program_line.py index 36aea1ed..8f62ecc0 100644 --- a/indoteknik_custom/models/solr/promotion_program_line.py +++ b/indoteknik_custom/models/solr/promotion_program_line.py @@ -3,7 +3,6 @@ from typing import Type import pysolr import json - class PromotionProgramLine(models.Model): _inherit = 'promotion.program.line' _solr_schema = 'promotion_program_lines' @@ -47,6 +46,7 @@ class PromotionProgramLine(models.Model): 'package_limit_user_i': rec.package_limit_user, 'package_limit_trx_i': rec.package_limit_trx, 'price_f': rec.price, + 'sequence_i': rec.sequence, 'product_ids': [x.product_id.id for x in rec.product_ids], 'products_s': json.dumps(products), 'free_product_ids': [x.product_id.id for x in rec.free_product_ids], |
