From dbe29669e6d14df33c9baf1888acf7499644a0d4 Mon Sep 17 00:00:00 2001 From: imperosol Date: Wed, 13 May 2026 13:33:12 +0200 Subject: [PATCH] remove `Product.buying_groups` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Savoir quel groupe a le droit d'acheter quel produit est maintenant déterminé avec le modèle `Price`. `Product.buying_groups` avait juste été laissé temporairement pour permettre un rollback si le déploiement des prix ne se passait pas bien. Comme il n'y a pas eu de problème, on peut maintenant le retirer. --- .../migrations/0040_remove_product_buying_groups.py | 11 +++++++++++ counter/models.py | 3 --- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 counter/migrations/0040_remove_product_buying_groups.py diff --git a/counter/migrations/0040_remove_product_buying_groups.py b/counter/migrations/0040_remove_product_buying_groups.py new file mode 100644 index 00000000..faa4f215 --- /dev/null +++ b/counter/migrations/0040_remove_product_buying_groups.py @@ -0,0 +1,11 @@ +# Generated by Django 5.2.13 on 2026-05-13 11:31 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [("counter", "0039_price")] + + operations = [ + migrations.RemoveField(model_name="product", name="buying_groups"), + ] diff --git a/counter/models.py b/counter/models.py index fbc208f3..899dd4cd 100644 --- a/counter/models.py +++ b/counter/models.py @@ -388,9 +388,6 @@ class Product(models.Model): tray = models.BooleanField( _("tray price"), help_text=_("Buy five, get the sixth free"), default=False ) - buying_groups = models.ManyToManyField( - Group, related_name="products", verbose_name=_("buying groups"), blank=True - ) archived = models.BooleanField(_("archived"), default=False) created_at = models.DateTimeField(_("created at"), auto_now_add=True) updated_at = models.DateTimeField(_("updated at"), auto_now=True)