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

MrpBom _skip_bom_line skips line of product that has two multi-choice attribute values when both are selected in Apply to variant

Abonnieren

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

Diese Frage wurde gekennzeichnet
development
1 Antworten
176 Ansichten
Avatar
Chuck Mako

Hello, I am working on modifying the skip bom line function internally to add so functionality but I am calling super() to keep the base functionality working, but there seems to be a problem with the default odoo function when multi-choice attribute values are selected in Apply to variant bom lines. Here's my setup:
Product: Table

Attribute: Size/Multi-Checkbox/Dynamic

Attribute values: Grandeur, Largeur

In my bom I have 1 material product: Plank, in the bom line I have selected Apply to variants: Size: Grandeur and Size: Largeur. 

Even tho my variant has both these attribute values selected it still skips the bom line. I have added some prints to the odoo function to see whats going on:

        other_attribute_valid = product._match_all_variant_values(bom_attribule_values - no_variant_bom_attributes)
_logger.warning("BOM values: %s", bom_attribule_values.mapped('name'))
_logger.warning("Product values: %s", product.product_template_attribute_value_ids.mapped('name'))
_logger.warning("other_attribute_valid: %s", other_attribute_valid)

# If there are no never attribute values on the line => 'always' and 'dynamic'
if not no_variant_bom_attributes:
_logger.warning("No variant bom attributes")
return not other_attribute_valid
odoo.addons.mrp.models.mrp_bom: BOM values: ['Grandeur', 'Largeur']
odoo.addons.mrp.models.mrp_bom: Product values: ['Grandeur', 'Largeur']
odoo.addons.mrp.models.mrp_bom: other_attribute_valid: False
odoo.addons.mrp.models.mrp_bom: No variant bom attributes

This is inside _skip_for_no_variant that gets called by skip_bom_line. The attributes match but it seems to fail in the no_variant_bom_attributes check.


0
Avatar
Verwerfen
Chuck Mako
Autor

Actually the issue was that we made mutli-checkbox be able to use dynamic variant creation, but skip_for_no_variant calls _match_all_variant_values and that method doesn't account for the fact that a product attribute can have multiple values in that case.

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Beste Antwort

Hi,

Odoo is skipping your BoM line because multi-choice (checkbox) attributes are not fully supported in the variant-matching logic of manufacturing. Even though your product variant has both values (Grandeur + Largeur) and the BoM line also has both selected, Odoo’s internal method _match_all_variant_values() does not validate multi-choice attributes using “AND logic.” Instead, it behaves as if attribute values in a BoM line are alternatives (OR), not combined requirements. As a result, it incorrectly returns False, which leads _skip_for_no_variant to return True, causing the BoM line to be skipped. This is a limitation/bug in Odoo 17–18. To fix it, you must override _match_all_variant_values() to check that all BoM attribute values exist on the product variant, or patch _skip_for_no_variant to use correct matching logic. Otherwise, multi-choice attributes will never work correctly with “Apply to Variant” in BoM lines.


Hope it helps.

0
Avatar
Verwerfen
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
How to make all branches for user active automatically after login his account?
development
Avatar
Avatar
1
Nov. 25
199
How to create a new field have 2 related field by developer mode
development
Avatar
Avatar
2
Okt. 25
517
i face one error while edit my website
development
Avatar
0
Okt. 25
632
How to add market price of the product to the Odoo 18 Community POS receipt?
development
Avatar
0
Okt. 25
557
Unable to create views in my custom module or an application Gelöst
development
Avatar
Avatar
2
Okt. 25
6636
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