|
|
""" 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 float_is_zero(move.quantity, precision_rounding=move.product_uom.rounding):
continue
productions = move._get_subcontract_production()
if not productions or (productions[:1].consumption == 'strict' and not productions[:1]._has_tracked_component()):
continue
move.show_subcontracting_details_visible = move.state == 'done' or any(prod.subcontracting_has_been_recorded and prod.state != 'done' for prod in productions)
|
|