Repository
OCA/manufacture · module folder · Try on Runboat
Module version
1.0.0
Category
Manufacturing
Folder size
0.26 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
http://www.camptocamp.com/
Last tracking update
2026-08-07 07:17:46
Authors
Camptocamp, Odoo Community Association (OCA)
Maintainers
Camptocamp, Odoo Community Association (OCA)
Committers
Pedro M. Baeza, Stéphane Bidoul (ACSONE)
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None
Description

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
mrp_bom_form_view mrp_bom_form mrp.bom form Inherits mrp.mrp_bom_form_view
mrp_bom_tree_view mrp_bom_tree mrp.bom tree Inherits mrp.mrp_bom_tree_view
view_mrp_bom_dismantling_product_choice_wizard BOM Dismantling product choice mrp.bom.dismantling_product_choice form New
view_mrp_bom_filter mrp.bom.select mrp.bom Inherits mrp.view_mrp_bom_filter
view_mrp_config mrp.config.settings Inherits mrp.view_mrp_config
view_mrp_product_produce_wizard MRP Product Produce mrp.product.produce Inherits mrp.view_mrp_product_produce_wizard
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (8)

New fields (2)
  • dismantled_product_id Many2one → product.product
    comodel_name='product.product' string='Dismantled product'
  • dismantling Boolean
    default=False string='Dismantling'
Public methods (3)
  • action_create_dismantling_bom(self)
    @api.multi
    Check dismantling_product_choice config and open choice wizard if needed or directly call create_dismantling_bom.
  • create_dismantling_bom(self, main_component=None)
    @api.multi
    Create a dismantling BoM based on this BoM If *main_component* is not None, this component will be set as main product in dismantling bom. Else first component will be taken (sorted by Id). :type main_component: product_product :rtype: dict
  • create_mrp_production(self)
    @api.multi
    Create a manufacturing order from this BoM

New fields (2)
  • bom_id Many2one → mrp.bom
    default=_get_bom_id args: 'mrp.bom'
  • component_id Many2one → product.product
    domain=[('id', '=', False)] required=True args: 'product.product'
Public methods (2)
  • create_bom(self)
    @api.multi
    Call dismantling bom creation method with main component specified.
  • on_change_bom_id(self)
    @api.onchange('bom_id')
    Update component_id domain to include only BOM components.

New fields (1)
  • dismantling_product_choice Selection
    args: [(0, 'Main BOM product will be set randomly'), (1, 'User have to choose which component to set as main BOM product')], 'Dismantling BOM'
Public methods (2)
  • get_default_dismantling_product_choice(self, fields)
    @api.multi
  • set_dismantling_product_choice(self)
    @api.multi

New fields (1)
  • move_lot_ids One2many → mrp.product.produced.line
    inverse_name='produce_id' string='Products to produce lots' args: 'mrp.product.produced.line'
Public methods (2)
  • do_produce(self)
    @api.multi
    Stock produced products lot_id and call parent do_produce
  • on_change_product_id(self)
    @api.onchange('product_id')
    Listen to product_id changes just for filling byproducts_lot_ids.

New fields (5)
  • lot_id Many2one → stock.production.lot
    string='Lot' args: 'stock.production.lot'
  • lot_required Boolean
    compute='_compute_lot_required'
  • move_id Many2one → stock.move
    required=True args: 'stock.move'
  • produce_id Many2one → mrp.product.produce
    required=True string='Produce' args: 'mrp.product.produce'
  • product_id Many2one → product.product
    related='move_id.product_id' args: 'product.product'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • action_view_bom(self, cr, uid, ids, context=None)
    Override parent method to add a domain which filter out dismantling BoM

New fields (1)
  • bom_count Integer
    compute='_bom_count' string='# Bill of Material'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • action_consume(self, product_qty, location_id=False, restrict_lot_id=False, restrict_partner_id=False, consumed_for=False)
    @api.multi
    Override restrict_lot_id if user define one for this move's product in wizard.

Loading…