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

Module: Purchase landed costs - Alternative option

Entity: purchase.cost.distribution.line

Compute Method: _compute_product_id

Inputs Method Outputs
for dist_line in self:
            # Cannot be done via related
            # field due to strange bug in update chain
            dist_line.product_id = dist_line.move_id.product_id.id

Back to entity