diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-07-03 10:54:32 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-07-03 10:54:32 +0700 |
| commit | dee0f12ed114837636d34824f86e5bfa2e055eb0 (patch) | |
| tree | 0b5b4f422c4e22083353703019f88a772ec4e25a | |
| parent | cd8a7d922a93944c1d79cf0576523554f6a8bc0f (diff) | |
| parent | be81dd2570b45de430db12ecb668f2e4df25d01b (diff) | |
Merge branch 'production' of bitbucket.org:altafixco/indoteknik-addons into production
3 files changed, 3 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], diff --git a/indoteknik_custom/views/promotion/promotion_program_line.xml b/indoteknik_custom/views/promotion/promotion_program_line.xml index 3f077a13..f3c2eea1 100644 --- a/indoteknik_custom/views/promotion/promotion_program_line.xml +++ b/indoteknik_custom/views/promotion/promotion_program_line.xml @@ -32,6 +32,7 @@ <field name="package_limit_user" /> <field name="package_limit_trx" /> <field name="price" attrs="{'invisible': [('promotion_type', '=', 'special_price')]}" /> + <field name="sequence"/> <field name="discount_type" attrs="{'invisible': [('promotion_type', '!=', 'special_price')]}" /> <field name="discount_amount" attrs="{'invisible': [('promotion_type', '!=', 'special_price')]}" /> </group> |
