diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-09-17 14:43:22 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-09-17 14:43:22 +0700 |
| commit | 1698ec300f2e7c363e41cb51ce94a39f66d6088b (patch) | |
| tree | 136e259cab87e01c991d89ec16ecf39e336d1fea | |
| parent | 3f7cb23684eb827e9610cdf6bdd80127c16f08c5 (diff) | |
cr type promotion
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 4 |
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: |
