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: stock.buffer

Compute Method: _compute_main_supplier

Inputs Method Outputs
for rec in self:
            if rec.item_type == "purchased":
                suppliers = rec._get_product_sellers()
                rec.main_supplier_id = suppliers[0].partner_id if suppliers else False
            else:
                rec.main_supplier_id = False

Back to entity