parameters: (self)
return_statement: return 'confirmed'
docstring: returns 'assigned' if enough components are reserved in order to complete
          the first operation of the bom. If not returns 'waiting'
docstring_summary: returns 'assigned' if enough components are reserved in order to complete
          the first operation of the bom. If not returns 'waiting'
docstring_tokens: returns assigned if enough components are reserved in order to complete the first operation of the bom . If not returns waiting
function: def _get_ready_to_produce_state(self):
          """ returns 'assigned' if enough components are reserved in order to complete
          the first operation of the bom. If not returns 'waiting'
          """
          self.ensure_one()
          operations = self.workorder_ids.operation_id
          if len(operations) == 1:
              moves_in_first_operation = self.move_raw_ids
          else:
              first_operation = operations[0]
              moves_in_first_operation = self.move_raw_ids.filtered(lambda move: move.operation_id == first_operation)
          moves_in_first_operation = moves_in_first_operation.filtered(
              lambda move: move.bom_line_id and
              not move.bom_line_id._skip_bom_line(self.product_id)
          )
  
          if all(move.state == 'assigned' for move in moves_in_first_operation):
              return 'assigned'
          return 'confirmed'
function_tokens: def _get_ready_to_produce_state ( self ) : self . ensure_one ( ) operations = self . workorder_ids . operation_id if len ( operations ) == 1 : moves_in_first_operation = self . move_raw_ids else : first_operation = operations [ 0 ] moves_in_first_operation = self . move_raw_ids . filtered ( lambda move : move . operation_id == first_operation ) moves_in_first_operation = moves_in_first_operation . filtered ( lambda move : move . bom_line_id and not move . bom_line_id . _skip_bom_line ( self . product_id ) ) if all ( move . state == 'assigned' for move in moves_in_first_operation ) : return 'assigned' return 'confirmed'