Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: DDMRP

Entity: mrp.bom

Compute Method: _compute_buffer

Inputs Method Outputs
for record in self:
            domain = record._get_search_buffer_domain()
            # NOTE: It can be possible to find multiple buffers.
            # For example if the BoM has no location set, and there
            # are buffers with the same product_id and buffer_profile_id
            # You do not know which one the search function finds.
            buffer = self.env["stock.buffer"].search(domain, limit=1)
            record.buffer_id = buffer

Back to entity