Purchase - Add Products from BoM

purchase_add_products_from_bom
REPOSITORY
REPOSITORYOCA/purchase-workflow
GIT
GIThttps://github.com/OCA/purchase-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/purchase-workflow/tree/12.0/purchase_add_products_from_bom
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYPurchase Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion
COMMITTERS
COMMITTERSOCA-git-bot, Magno Costa, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/purchase-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:23
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - purchase_mrp
    - mrp
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - stock
    - barcodes
    - resource
    - purchase_stock
    - stock_account
    - account
    - analytic
    - portal
    - http_routing
    - digest
    - purchase
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
add_products_from_bom_wizard_view Add Products From BoM add.products.from.bom form New
purchase_add_products_from_bom_form_view purchase.order.form purchase.order field Inherits purchase.purchase_order_form
Models touched (3)

New fields (8)
  • bom_id Many2one → mrp.bom
    comodel_name='mrp.bom' string='Bill of Material'
  • bom_ids One2many → mrp.bom
    comodel_name='mrp.bom' related='product_id.product_tmpl_id.bom_ids' string='Bill of Materials'
  • currency_id Many2one → res.currency
    comodel_name='res.currency' string='Currency'
  • product_id Many2one → product.product
    comodel_name='product.product' required=True string='Product'
  • product_qty Float
    default=1 digits=dp.get_precision('Product Unit of Measure') required=True string='Quantity'
  • product_uom_id Many2one → uom.uom
    comodel_name='uom.uom' string='Unit of Measure'
  • purchase_id Many2one → purchase.order
    comodel_name='purchase.order' string='Purchase Order'
  • raw_product_line_ids One2many → add.products.from.bom.lines
    comodel_name='add.products.from.bom.lines' inverse_name='product_finished_id' string='Raw Products'
Public methods (3)
  • add_products(self)
  • button_get_products_from_bom(self)
  • get_products_from_bom(self, finished_product, product_qty, bom_id)

New fields (17)
  • bom_id Many2one → mrp.bom
    comodel_name='mrp.bom' string='Bill of Material'
  • bom_ids One2many → mrp.bom
    comodel_name='mrp.bom' related='product_id.product_tmpl_id.bom_ids' string='Bill of Materials'
  • currency_id Many2one → res.currency
    comodel_name='res.currency' related='product_finished_id.currency_id' string='Currency'
  • exploded_product Boolean
    string='Already Exploded Product'
  • has_bom Boolean
    compute='_compute_has_bom'
  • main_bom_product_id Many2one → product.product
    comodel_name='product.product' readonly=True string='Main BoM Product'
  • orig_bom_product_id Many2one → product.product
    comodel_name='product.product' readonly=True string='Origin BoM Product'
  • price_unit Monetary
    currency_field='currency_id' string='Unit Price'
  • product_finished_id Many2one → add.products.from.bom
    comodel_name='add.products.from.bom'
  • product_id Many2one → product.product
    comodel_name='product.product' string='Product'
  • product_qty Float
    digits=dp.get_precision('Product Unit of Measure') required=True string='Quantity to Buy'
  • product_qty_after_buy Float
    compute='_compute_product_qty_after_buy' string='Quantity After Buy'
  • product_qty_stock Float
    related='product_id.qty_available' string='Quantity Available in Stock'
  • product_uom_id Many2one → uom.uom
    comodel_name='uom.uom' string='Unit of Measure'
  • purchase_uom_id Many2one → uom.uom
    comodel_name='uom.uom' string='Purchase Unit of Measure'
  • selected_product Boolean
    default=True string='Selected Product'
  • total_product_value Monetary
    compute='_compute_total_product_value' currency_field='currency_id' string='Total Product Value'
Public methods (2)
  • add_products_from_bom(self)
  • return_finished_products_from_bom(self)

New fields (1)
  • bom_count Integer
    store=True
Public methods (0)

No public methods.