summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindoteknik_custom/models/sale_order.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 43ee3ef9..65b92601 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -125,7 +125,9 @@ class SaleOrder(models.Model):
if line_program.promotion_type:
promotion_types.append(dict(line_program._fields['promotion_type'].selection).get(line_program.promotion_type))
- rec.type_promotion = ', '.join(promotion_types)
+ # Removing duplicates by converting to a set, then back to a list
+ rec.type_promotion = ', '.join(sorted(set(promotion_types)))
+
def _compute_purchase_delivery_amount(self):
for order in self: