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

Module: Inventory

Entity: stock.move

Compute Method: _compute_show_details_visible

Inputs Method Outputs
""" According to this field, the button that calls `action_show_details` will be displayed
        to work on a move from its picking form view, or not.
        """
has_package = self.user_has_groups('stock.group_tracking_lot')
multi_locations_enabled = self.user_has_groups('stock.group_stock_multi_locations')
consignment_enabled = self.user_has_groups('stock.group_tracking_owner')
show_details_visible = multi_locations_enabled or has_package or consignment_enabled
for move in self:
            if not move.product_id:
                move.show_details_visible = False
            elif len(move.move_line_ids) > 1:
                move.show_details_visible = True
            else:
                move.show_details_visible = show_details_visible or move.has_tracking != 'none'

Back to entity