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

Module: MRP Subcontracting

Entity: stock.move

Compute Method: _compute_show_subcontracting_details_visible

Inputs Method Outputs
""" Compute if the action button in order to see moves raw is visible """
self.show_subcontracting_details_visible = False
for move in self:
            if not move.is_subcontract:
                continue
            if not move.move_line_ids or move.uom_id.is_zero(move.quantity):
                continue
            productions = move._get_subcontract_production().filtered(lambda m: m.state != 'cancel')
            if not productions:
                continue
            move.show_subcontracting_details_visible = True

Back to entity