Zum Inhalt springen
Odoo Menü
  • Anmelden
  • Jetzt gratis testen
  • Apps
    Finanzen
    • Buchhaltung
    • Rechnungsstellung
    • Spesenabrechnung
    • Tabellenkalkulation (BI)
    • Dokumente
    • E-Signatur
    Vertrieb
    • CRM
    • Vertrieb
    • Kassensystem – Shop
    • Kassensystem – Restaurant
    • Abonnements
    • Vermietung
    Websites
    • Website-Builder
    • E-Commerce
    • Blog
    • Forum
    • Livechat
    • E-Learning
    Lieferkette
    • Lager
    • Fertigung
    • PLM
    • Einkauf
    • Wartung
    • Qualität
    Personalwesen
    • Mitarbeiter
    • Personalbeschaffung
    • Abwesenheiten
    • Mitarbeiterbeurteilung
    • Personalempfehlungen
    • Fuhrpark
    Marketing
    • Social Marketing
    • E-Mail-Marketing
    • SMS-Marketing
    • Veranstaltungen
    • Marketing-Automatisierung
    • Umfragen
    Dienstleistungen
    • Projekte
    • Zeiterfassung
    • Außendienst
    • Kundendienst
    • Planung
    • Termine
    Produktivität
    • Dialog
    • Genehmigungen
    • IoT
    • VoIP
    • Wissensdatenbank
    • WhatsApp
    Apps von Drittanbietern Odoo Studio Odoo Cloud-Plattform
  • Branchen
    Einzelhandel
    • Buchladen
    • Kleidergeschäft
    • Möbelhaus
    • Lebensmittelgeschäft
    • Baumarkt
    • Spielwarengeschäft
    Essen & Gastgewerbe
    • Bar und Kneipe
    • Restaurant
    • Fast Food
    • Gästehaus
    • Getränkehändler
    • Hotel
    Immobilien
    • Immobilienagentur
    • Architekturbüro
    • Baugewerbe
    • Immobilienverwaltung
    • Gartenarbeit
    • Eigentümervereinigung
    Beratung
    • Buchhaltungsfirma
    • Odoo-Partner
    • Marketingagentur
    • Anwaltskanzlei
    • Talentakquise
    • Prüfung & Zertifizierung
    Fertigung
    • Textil
    • Metall
    • Möbel
    • Speisen
    • Brauerei
    • Firmengeschenke
    Gesundheit & Fitness
    • Sportklub
    • Brillengeschäft
    • Fitnessstudio
    • Therapeut
    • Apotheke
    • Friseursalon
    Handel
    • Handyman
    • IT-Hardware & -Support
    • Solarenergiesysteme
    • Schuster
    • Reinigungsdienstleistungen
    • HLK-Dienstleistungen
    Sonstiges
    • Gemeinnützige Organisation
    • Umweltschutzagentur
    • Plakatwandvermietung
    • Fotostudio
    • Fahrrad-Leasing
    • Software-Händler
    Alle Branchen ansehen
  • Community
    Lernen
    • Tutorials
    • Dokumentation
    • Zertifizierungen
    • Schulung
    • Blog
    • Podcast
    Bildung fördern
    • Bildungsprogramm
    • Scale-Up! Planspiel
    • Odoo besuchen
    Software anfragen
    • Herunterladen
    • Editionen vergleichen
    • Releases
    Zusammenarbeiten
    • Github
    • Forum
    • Veranstaltungen
    • Übersetzungen
    • Partner werden
    • Dienstleistungen für Partner
    • Buchhaltungsfirma registrieren
    Services anfragen
    • Partner finden
    • Buchhalter finden
    • Einen Experten treffen
    • Implementierungsservices
    • Kundenreferenzen
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Eine Demo erhalten
  • Preiskalkulation
  • Hilfe

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Buchhaltung
  • Lager
  • PoS
  • Projekte
  • MRP
All apps
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Hilfe

Deleting a variant in a product - Odoo 14

Abonnieren

Erhalten Sie eine Benachrichtigung, wenn es eine Aktivität zu diesem Beitrag gibt

Diese Frage wurde gekennzeichnet
productvariantvariants
3 Antworten
3460 Ansichten
Avatar
JEREMY GOBARD

Hello,

My products have multiple variants : size, location, color, ...

I need to remove all "size" variants from my products, but I always get an error in my automatic imports. I manage 20 000 products and cannot update it one by one.

Anyone would have an idea on what to do?


Best

Jeremy

0
Avatar
Verwerfen
Avatar
Sergio Infante
Beste Antwort

Hi Jeremy & Christophe

Totally get it — handling attributes like Size across 20,000 products in Odoo 14 can get tricky fast, especially with imports. The issue you’re facing is pretty common and usually tied to how Odoo 14 manages attribute lines and variant regeneration.

In Odoo 14, product variants are tightly linked to the attribute lines on the product template. If your import tries to remove an attribute (like “Size”) that’s actively generating variants, Odoo throws errors because it can’t reconcile the variant definitions.

Here’s how you can cleanly remove the “Size” attribute in bulk:

Step 1: Identify and unlink “Size” from attribute lines

Use the model product.template.attribute.line — export the records where attribute_id = Size.

In your export (via Excel or CSV):

  • Include fields: id, product_tmpl_id/id, attribute_id/id, value_ids/id

Then, either:

  • Manually delete those lines via the UI (tedious)
  • Or import a file with just the id column and leave all other fields empty to remove the line — or write a small script to unlink them.

Step 2: Remove obsolete variants

After removing the attribute lines, Odoo won’t automatically delete the existing product variants that had Size. You’ll need to remove them manually or through a script:

# WARNING: Use with caution. Only run after unlinking attribute lines.


size_attr = env['product.attribute'].search([('name', '=', 'Size')])

variant_ids = env['product.product'].search([

    ('product_template_attribute_value_ids.attribute_id', '=', size_attr.id)

])

variant_ids.unlink()

Make sure those variants aren't tied to existing sales ordes, stock moves or accounting records, otherwise odoo won't let you delete them.

Step 3: Rebuild your variants (optional)

If your products now only need Color or Location, you can go to each template and click “Update Variants” or trigger it via code. In Odoo 14, this sometimes has to be done template by template unless you automate it.

Tips for keeping it clean going forward

  • Disable the Size attribute (active = False) so it’s not reused in the future.
  • Add logic to your import scripts to exclude deprecated attributes.
  • If you’re doing catalog management at this scale regularly, consider a small module that gives you admin tools to clean attributes in bulk.

Let me know if you want help generating an import file or action script for this — no way you’re doing 20,000 one by one.

0
Avatar
Verwerfen
Avatar
Dương Nguyễn
Beste Antwort

Export those product template that contain size attribute then remember to choose external_id and product_variant_ids, attribute_line_ids and then it will give you a csv file
Then delete all data in column of variant and attribute
Then import back again in odoo done

Remember if some products exist in Sale Order or Pos Order you will need to handle them first

0
Avatar
Verwerfen
Avatar
Christophe Bauwens
Beste Antwort

I have the same question for weeks.. No one has an answer :(

0
Avatar
Verwerfen
Dương Nguyễn

Export those product template that contain size attribute then remember to choose external_id and product_variant_ids, attribute_line_ids and then it will give you a csv file
Then delete all data in column of variant and attribute
Then import back again in odoo done

Remember if some products exist in Sale Order or Pos Order you will need to handle them first

Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!

Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!

Registrieren
Verknüpfte Beiträge Antworten Ansichten Aktivität
Merging Separate Products into Variants in Odoo
product variant variants
Avatar
Avatar
2
Juni 25
1330
Product variants combination
product variant variants
Avatar
Avatar
Avatar
4
Jan. 18
8989
Dynamic Product Variants from Attributes: Odoo creates all Variants upon Purchase Order in Odoo 15
product variant product.product variants
Avatar
Avatar
Avatar
2
Okt. 25
6104
Pricing Variants
product pricing variant variants
Avatar
0
März 23
2611
Variant prices
product variant pricelist variants
Avatar
Avatar
Avatar
Avatar
4
März 16
9198
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Herunterladen
  • Github
  • Runbot
  • Übersetzungen
Dienstleistungen
  • Odoo.sh-Hosting
  • Support
  • Upgrade
  • Individuelle Entwicklungen
  • Ausbildung
  • Buchhalter finden
  • Partner finden
  • Partner werden
Über uns
  • Unsere Firma
  • Markenwerte
  • Kontakt
  • Karriere
  • Veranstaltungen
  • Podcast
  • Blog
  • Kunden
  • Rechtliches • Datenschutz
  • Sicherheit
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo ist eine Suite von Open-Source-Betriebsanwendungen, die alle Bedürfnisse Ihres Unternehmens abdecken: CRM, E-Commerce, Buchhaltung, Lager, Kassensystem, Projektmanagement etc.

Das einzigartige Wertversprechen von Odoo ist, dass es gleichzeitig sehr einfach zu bedienen und voll integriert ist.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now