Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

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

Naroči se

Get notified when there's activity on this post

This question has been flagged
development
1 Odgovori
202 Prikazi
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
Opusti
Chuck Mako
Avtor

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
Best Answer

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
Opusti
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Prijavi
Related Posts Odgovori Prikazi Aktivnost
How to make all branches for user active automatically after login his account?
development
Avatar
Avatar
Avatar
3
nov. 25
284
How to create a new field have 2 related field by developer mode
development
Avatar
Avatar
2
okt. 25
539
i face one error while edit my website
development
Avatar
0
okt. 25
656
How to add market price of the product to the Odoo 18 Community POS receipt?
development
Avatar
0
okt. 25
576
Unable to create views in my custom module or an application Solved
development
Avatar
Avatar
2
okt. 25
6730
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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