Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

Bom Structure & Cost in odoo manufacturing

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
manufacturingpythonxmlbomv14
1 Beantwoorden
4951 Weergaven
Avatar
jomin joseph

Hi i am using odoo 14 community edition, when i use bom structure and cost from manufacturing module, the product cost for each components is same as BoM Cost , why is it the same , i want to display each products unit cost in product cost and the total cost(quantity*product cost) in bom cost for each component how can this be made possible. using any configuration, python,xml or is there any free module to achieve the same. This is snippet of the error. Thank you


0
Avatar
Annuleer
Creyox Technologies

Hello jo,

I think there is no any free module that achieve your goal. You have to create customize module for that.

jomin joseph
Auteur

@Shivoham can you tell me how can i create a custom module for this what do i need to inherit to change product cost in this

Avatar
Siddharth Tarpada
Beste antwoord

Hello Jo,

You can create new py file and rewrite the method _get_bom_lines of mrp_report_bom_structure and assign it.

Kindly Refer below example.


from odoo\.addons\.mrp\.report\.mrp_report_bom_structure\ import\ ReportBomStructure


def\ _get_bom_lines\(self,\ bom,\ bom_quantity,\ product,\ line_id,\ level\):
\ \ \ \ \ \ \ \ components\ =\ \[\]
\ \ \ \ \ \ \ \ total\ =\ 0
\ \ \ \ \ \ \ \ for\ line\ in\ bom\.bom_line_ids:
\ \ \ \ \ \ \ \ \ \ \ \ line_quantity\ =\ \(bom_quantity\ /\ \(bom\.product_qty\ or\ 1\.0\)\)\ \*\ line\.product_qty
\ \ \ \ \ \ \ \ \ \ \ \ if\ line\._skip_bom_line\(product\):
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ continue
\ \ \ \ \ \ \ \ \ \ \ \ company\ =\ bom\.company_id\ or\ self\.env\.company
\ \ \ \ \ \ \ \ \ \ \ \ price\ =\ line\.product_id\.uom_id\._compute_price\(line\.product_id\.with_company\(company\)\.standard_price,\ line\.product_uom_id\)
\ \ \ \ \ \ \ \ \ \ \ \ if\ line\.child_bom_id:
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ factor\ =\ line\.product_uom_id\._compute_quantity\(line_quantity,\ line\.child_bom_id\.product_uom_id\)
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ sub_total\ =\ self\._get_price\(line\.child_bom_id,\ factor,\ line\.product_id\)
\ \ \ \ \ \ \ \ \ \ \ \ else:
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ sub_total\ =\ price\ \*\ line_quantity
\ \ \ \ \ \ \ \ \ \ \ \ sub_total\ =\ self\.env\.company\.currency_id\.round\(sub_total\)
\ \ \ \ \ \ \ \ \ \ \ \ components\.append\(\{
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'prod_id':\ line\.product_id\.id,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'prod_name':\ line\.product_id\.display_name,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'code':\ line\.child_bom_id\ and\ line\.child_bom_id\.display_name\ or\ '',
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'prod_qty':\ line_quantity,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'prod_uom':\ line\.product_uom_id\.name,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'prod_cost':\ company\.currency_id\.round\(price\),
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'parent_id':\ bom\.id,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'line_id':\ line\.id,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'level':\ level\ or\ 0,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'total':\ sub_total,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'child_bom':\ line\.child_bom_id\.id,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'phantom_bom':\ line\.child_bom_id\ and\ line\.child_bom_id\.type\ ==\ 'phantom'\ or\ False,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'attachments':\ self\.env\['mrp\.document'\]\.search\(\['\|',\ '\&',
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \('res_model',\ '=',\ 'product\.product'\),\ \('res_id',\ '=',\ line\.product_id\.id\),\ '\&',\ \('res_model',\ '=',\ 'product\.template'\),\ \('res_id',\ '=',\ line.product_id.product_tmpl_id.id)]),

})
total += sub_total
return components, total

ReportBomStructure._get_bom_lines = _get_bom_lines


0
Avatar
Annuleer
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
How to remove internal reference from product bom list view
python xml mrp bom v14
Avatar
Avatar
1
apr. 22
3118
Avoid seconds in tree view of a datetime filed
python xml v14
Avatar
Avatar
1
jan. 22
3244
How do I import BOM data from other ERP to Odoo?
manufacturing python bom
Avatar
0
nov. 15
4536
MO "To Consume" not updating Pick Component transfer for MO Opgelost
manufacturing picking bom v14
Avatar
Avatar
Avatar
2
sep. 25
4692
Dynamic form depending of values in a one2many
python xml form v14
Avatar
0
jun. 21
3726
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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